I am wishing to add another instance to a sequential multi-instance sub-process using the technique described here: Modify Multi-Instance Process
I am receiving the following error: Concurrent instantiation not possible for activities in scope SequentialUpdateSubProcess#multiInstanceBody
The modification is being performed by a script. The relevant lines:
runtimeService.createProcessInstanceModification(execution.getProcessInstanceId())
.startBeforeActivity(“SequentialUpdateSubProcess”)
.setVariableLocal(“event”, eventJsonValue)
.execute()
This succeeds if the sub-process is parallel-multi-instance. I suspect it is trying to start the new instance immediately, rather than after the intial instance completes. Is there a different technique to add to a sequential multi-instance activity? I have attached the model.
OrderUpdateRunner.bpmn (9.2 KB)