Hi, I’m using “triggerable” service tasks as described on BPMN 2.0 Constructs · Flowable Open Source Documentation
When we receive the callback from an external system, I use an executionQuery to see if the flow is waiting at that activity:
List<ProcessInstance> processInstances = runtimeService.createProcessInstanceQuery()
.processInstanceBusinessKey(myBusinessKeyID)
.list();
List<Execution> childExecutions = new ArrayList<>();
for (ProcessInstance pi : processInstances) {
childExecutions.addAll(runtimeService
.createExecutionQuery() //
.processInstanceId(pi.getProcessInstanceId()) //
.activityId(activityId) //
.list());
}
Now, this is returning executions that are in the “execute” phase of the ServiceTask, that is they’re still running the execute
method.
Is there a way to tell if the service task has reached the waiting ( “triggerable” ) state?
Thanks