Steps to reproduce:
1) create a process model containing a parallel multi instance call activity as follows:
<bpmn:callActivity calledElement="testProcess"> <bpmn:extensionElements> <camunda:in variables="all" /> <camunda:out variables="all" /> </bpmn:extensionElements> <bpmn:multiInstanceLoopCharacteristics> <bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">2</bpmn:loopCardinality> </bpmn:multiInstanceLoopCharacteristics> </bpmn:callActivity>
2) start a process instance of it
Problem:
The variables nrOfInstances, nrOfActiveInstances, nrOfCompletedInstances and loopCounter are passed to called process instance. When the called process instance finishes, then these variables are passed back to the calling process instance. So that these variables will set to their origin values in the calling process instance. This leads to the problem, that the nrOfActiveInstances will never be set to zero, so that the parallel multi instance behavior cannot complete.
Hints:
A solution could be at least not to pass the variables nrOfActiveInstances and nrOfCompletedInstances to the called process instance, because the parallel multi instance behavior relies on these variables.
See also: https://forum.camunda.org/t/instance-gets-stuck-if-parallel-multi-instance-on-call-process-has-output-mapping-for-all/456