Java Receive Task trigger

In app I want to trigger ALL “Java Receive Tasks”.

Is there any easy way?

I can get all Execution objects but I only want the ones that are waiting on “trigger”.

How can I get that event state or perhaps the Task type so I know which Executions to trigger and which to leave alone?

Thanks

You can do an ExecutionQuery from the runtimeService, passing the activityId of the receive task.