Sub-process element
Use the Sub-process element (Fig. 1) to run a business process from another process.
Using the Sub-process element to run other processes has the following specifics:
-
Process parameter values can be passed from the parent process to its sub-process and vice-versa. This means that you can run a sub-process with specific parameter values, and after the sub-process completes – use its results in the parent process.
-
The Sub-process element will activate its outgoing flows only after the corresponding sub-process is complete.
-
If any of the incoming parameters of the Sub-process element are mapped to a data collection, the element will run in the multi-instance mode:
- The Sub-process element will run a separate instance of the sub-process per each instance of the incoming collection.
- The Sub-process element will return an outbound data collection populated with outbound and bi-directional parameters returned by every sub-process instance.
- The Sub-process element will complete its execution when all sub-process instances are complete.
Using sub-processes is recommended to avoid creating process diagrams that are too large and complex to efficiently use or maintain. In addition, large process diagrams are more resource-heavy. The Sub-process element also enables re-using business processes that already exist in Creatio. For example, you can use the Sub-process element in an opportunity process that includes a “Meeting with customer” stage, which exists as a separate business process in Creatio.
Sub-process element operation
Based on the type of its incoming parameter values (regular or collection) a sub-process element can run in a “single instance mode,” or “multi-instance mode,” which in turn can be sequential or parallel.
Single instance mode
The Sub-process element runs in the “single instance mode” if none of the sub-process parameters are mapped to a data collection.
Execution | When the incoming flow is activated, the Sub-process element activates the Simple start event of the process specified in the Which process to run? field. |
Completion | The Sub-process element is considered complete when the corresponding sub-process instance completes its execution. |
Sequential multi-instance mode
The Sub-process element runs in the “sequential multi-instance mode” when at least one of the sub-process elements is mapped to a data collection and the “Sequential” execution method is selected. The sequential execution method is selected by default when a sub-process is mapped to a data collection.
Use the Execution method parameter to select the sequential or parallel execution method. Selecting the execution method is unavailable when none of the process parameters are mapped to a data collection. More information on the parameters of the Sub-process element is available in the “Sub-process element parameters” section of this article.
Execution | When its incoming flow is activated, the Sub-process element starts looping through the data collection. For each item of the data collection, the Sub-process element runs a new instance of the process specified in the Which process to run? field by activating the Simple start event of the sub-process. |
Completion | Upon completion of all sub-process instances, the element creates an entry in the outgoing data collection and populates the entry with parameter values from the corresponding parameters of the completed sub-process instance. After that, the next sub-process instance will be launched. |
Parallel multi-instance mode
The Sub-process element runs in the “parallel multi-instance mode” if at least one of the sub-process elements is mapped to a data collection and the parallel execution method is selected.
Use the Execution method parameter to select the sequential or parallel execution method. Selecting the execution method is unavailable when none of the process parameters are mapped to a data collection. More information on the parameters of the Sub-process element is available in the “Sub-process element parameters” section of this article.
Execution | When its incoming flow is activated, the Sub-process element starts looping through the data collection. For each item of the data collection, the Sub-process element runs a new instance of the process specified in the Which process to run? field by activating the Simple start event |