Start the subprocess parallel with values from paraent workflow

Completion condition is optional, it means if completion condition is not given, then all the multi instances are expected to complete in-order to execute the next activity in the process, so still that execution token will waits in the multi-instance activity until all the instances completes.

When the completion condition satisfies, and if few multi instances are still active, then those instances are deleted and the process continues to execute further activities in the process.

for more details refer the docs for completion condition in multi instance activity.

Hints:

  • nrOfInstances : the total number of instances
  • nrOfActiveInstances : the number of currently active, i.e., not yet finished, instances. For a sequential multi-instance, this will always be 1
  • nrOfCompletedInstances : the number of already completed instances
  • loopCounter : indicates the index in the for each loop of that particular instance
<userTask id="miTasks" name="My Task" camunda:assignee="${assignee}">
  <multiInstanceLoopCharacteristics isSequential="false"
     camunda:collection="assigneeList" camunda:elementVariable="assignee" >
    <completionCondition>${nrOfCompletedInstances/nrOfInstances >= 0.6 }</completionCondition>
  </multiInstanceLoopCharacteristics>
</userTask>
1 Like