Multi-instance allows for the element to be repeated within a process. There are two options for how to execute multi-instance elements: sequentially or in parallel.
-
Sequential executions only ever have a single instance running at any
one time. The next instance will only start after the previous one has been
completed.
-
Parallel executions start all instances at once, meaning they are all
active and can all be worked on at the same time.
Multi-instance elements are displayed as three parallel lines at the bottom of the original element. Sequential lines are horizontal and parallel lines are vertical.
Input Parameters
Parameter | Required? | Description |
---|---|---|
Cardinality | Optional | Cardinality sets the number of instances to be executed by the
multi-instance element. This can be set as a static value, a process
variable, or calculated as an expression. The number of instances is calculated once, when entering the activity. |
Collection | Required | A collection can be used to set the number of instances to be executed by referencing a list of items (an Array type). |
Element Variable | Required | An element variable is used to create a variable for each instance of the multi-instance element and each variable created by the element variable is assigned one value from the collection. |
Element Index Variable | Optional | The index of the current element being processed in the array. |
Completion Condition | Required for Parallel |
The Completion Condition determines if the multi-instance can be promptly completed upon meeting the condition. This expression is evaluated all the time an instance of the multi-instance complete. If the condition is true any remaining active instances are terminated. Possible variables when entering the completion condition are as follows:
An example of a completion condition for the case when the number of completed instances is equal or higher than the total number of instances is: ${nrOfCompletedInstances} >= ${nrOfInstances} |