We have the following model -
Start -> Receive Task -> User Task -> End
After starting the process the activity gets stuck at receive task. How to send the signal to the receive task so that it gets completed and the user task gets started?
We are using the following code -
Execution execution = runtimeService.createExecutionQuery()
.processInstanceId(pi.getId())
.activityId("ReceiveTask")
.singleResult();
assertNotNull(execution);
runtimeService.signal(execution.getId());
The execution object is always null. We are getting the following exception - activitiObjectNotFoundException ->ExecutionID does not exist.
Also in our example where is the ideal place to add the runtime.signal() call?