Multiple Sub-Processes Concepts
The Context of a Process
Each Process has one main entity, called the Process Entity.
The Process Entity provides the starting point to access the rest of the Process data.
The context of a Process is defined by the main Process Entity.
- If the Process (or Sub-Process) is created through Expert View, the Process Entity is not set.
- You need to manually set the Process Entity of the Multiple Sub-Process to access its data.
Basic and Advanced Settings
You can specify Basic or Advanced settings for a Multiple Sub-Process:
- Basic Configuration → Applies Bizagi's default settings through a simple wizard.
- Advanced Settings → Allows custom configuration for specific business cases using the complete Sub-Process wizard.
XPath to Collection
The collection XPath is the XPath that relates the Parent entity with the Collection entity.
This is where the instances of the Multiple Sub-Process will be created.
Number of Instances
The number of instances created by a Multiple Sub-Process depends on:
- Items in Collection → Based on the number of items in a 1-N relationship.
- Integer Constant → Defined by a constant integer value.
- Items Attribute → Defined by an integer-type attribute from the data model.
Clean Previous Instances
When enabled, all instances of the Collection will be re-created if the Process re-enters the Multiple Sub-Process.
- By default, Bizagi ignores previously created instances and only creates cases for new records.
- If Clean Previous Instances is enabled, all instances will be re-created every time the Process enters the Multiple Sub-Process.
Example: If the Multiple Sub-Process created 4 instances the first time, it will create another 4 instances the second time, resulting in 8 instances total.
Group
In some cases, Multiple Sub-Processes need to be grouped based on specific attributes.
Example:
- In the Students Applications Process, if the Sub-Process needs to be grouped by gender, two instances will be created:
- One for girls
- One for boys
The image below shows how three students are grouped into two cases (one for men and one for women):
Related Entity or Group in Collection
Usually, the Collection entity and the Process Entity of the Multiple Sub-Process are the same.
However, in some cases, they are different. In such cases, the Wizard will display either:
- Related Entity → When the Collection is not grouped.
- Group in Collection → When the Collection is grouped (a one-to-many relationship is required).
Example: School Year Planning
A school needs to plan the new school year.
- Parent Process: Back to School
- Process Entity: Back to School
- Sub-Process: Grade Planning
- Process Entity: Planning
Key Detail:
- The Collection Entity that creates cases (Grades) is different from the Sub-Process entity (Planning).
- Bizagi requires a relationship to link each Planning case to the corresponding Grade.
No Relationship Exists Initially
Bizagi Requests a Relationship
Relationship is Created
Execution Mode
Multiple Sub-Process instances can be created in two ways:
- Parallel → Instances are created simultaneously.
- Sequential → Instances are created one after another.
The Sub-Process shape changes based on the execution mode:
-
Parallel Execution Mode
-
Sequential Execution Mode
Important Notes:
- If Sequential Mode is selected, Exit Mode is not available.
- If Group By is used, only Parallel Execution Mode is available.
Exit Mode
Determines how the Sub-Process exits and interacts with the Parent Process.
Exit Mode Options:
-
StandAlone → The Parent Process moves to the next activity as soon as the Sub-Process starts.
- The Sub-Process remains open even if the Parent Process ends.
- Not available in Sequential Mode.
-
Integrated → The Parent Process waits for the Sub-Process to complete before proceeding.
- Similar to a sequence pattern: Activity B cannot start until Activity A ends.
Integrated Mode Options:
- All Tokens → The Parent Process continues only after all Sub-Processes are completed.
- Each Token → The Parent Process continues each time a Sub-Process is completed.
- This may create multiple activations in the Parent Process.
- Token synchronization is recommended.
- One Token → The Parent Process continues after the first Sub-Process finishes.
- Other Sub-Processes continue running, but do not trigger additional activations.
Recommendation: Use StandAlone, Integrated - All Tokens, Integrated - Each Token, or Integrated - One Token for best results.
- Expression Defined → The Parent Process continues based on a custom expression.