Hello. I’m having a problem with call activities in this workflow. The scenario is that a spring scheduler scans a database for records. Based on what it finds, it starts this project and it goes through one of 4 call activities. It may need to go through another call activity, hence the loopback to the intermediate event. The problem is that once a call activity is complete and it loops back to the intermediate event, the following code tells me I’ve got two instances of the same business key:
List<ProcessInstance> processInstances =
runtimeService.createProcessInstanceQuery().processInstanceBusinessKey("business-key").active().list();
My understanding is that for the call activity, a new instance is created, but I would have thought that the process would be terminated when the call activity was complete, leaving only one process instance. Is my understanding of this correct?
So, my expectation here, in the scenario I outlined, is that I should only get one active process returned from which I can trigger an event to move things along.
I definitely don’t have data which has duplicate business keys, they are all unique.
Any suggestions?