cancel
Showing results for 
Search instead for 
Did you mean: 

how to finish looping subprocess

sebastian_minat
Champ in-the-making
Champ in-the-making
Hi to all,in my process I have a sub process that iterates 3 ​​times and then continue with the normal flow within the sub process if the condition is ok "Sent Info ?" the sub process should end no matter and stop iterating, the problem is how to do this?. I appreciate if someone can give me some help with this.

Thank you.
2 REPLIES 2

silvioneto
Champ in-the-making
Champ in-the-making
You can throw an exception when you want to stop the looping. You may want to catch it with an boundary event.

martin_grofcik
Confirmed Champ
Confirmed Champ
Multiinstance characteristics could help you.
http://www.activiti.org/userguide/#bpmnMultiInstance
(can be used for activity calls and subprocesses too. Have a look on completionCondition

  <multiInstanceLoopCharacteristics isSequential="false"
     activiti:collection="assigneeList" activiti:elementVariable="assignee" >
    <completionCondition>${nrOfCompletedInstances/nrOfInstances >= 0.6 }</completionCondition>
  </multiInstanceLoopCharacteristics>