To create reusable process

Hi @Minisha_M ,

You can configure the multi-instance characteristics to the Call Activity. A multi-instance activity is a way of defining repetition for a certain step in a business process. In programming concepts, a multi-instance matches the for each construct: it allows execution of a certain step or even a complete subprocess for each item in a given collection, sequentially or in parallel.


Three vertical lines indicate that the instances will be executed in parallel , while three horizontal lines indicate sequential execution.

image

  • 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

You can configure your bpmn model like below (multi-instance sequential execution):


Here the collection variable processList contains array of ProcessDefinitionKeys . Element variable or iteration variable called someSubProcess which holds the ProcessDefinitionKey of the subprocess needs to be invoked.

<bpmn:callActivity id="Activity_0vpe19a" name="OCR" camunda:asyncBefore="true" calledElement="${someSubProcess}">
      <bpmn:incoming>Flow_0ymomiv</bpmn:incoming>
      <bpmn:outgoing>Flow_0uhiduz</bpmn:outgoing>
      <bpmn:multiInstanceLoopCharacteristics isSequential="true" camunda:asyncBefore="true" camunda:collection="${processList}" camunda:elementVariable="someSubProcess" />
</bpmn:callActivity>

Refer this post:

Completion condition in multi-instance activity:

2 Likes