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.
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
Execution | When its incoming flow is activated, the [Sub-process] element activates the [Simple] start event of the process specified in the [Which process to run?] field. As a result, the actual version of the sub-process is launched as a new independent process instance. If any of the parameters are populated in the [Process parameters] block of the [Sub-process] element, the process will be run with those parameter values. If any of the process parameters are mapped to a data collection, separate process instances will be launched for each item in the data collection. Read more in the “Working with collections” article. If the “actual” sub-process version changes after the [Sub-process] element has been launched, the [Sub-process] will execute according to the version that was active at the time of its launching. Note that the sub-process creates a separate instance in the [Process Log] section, which displays the sub-process tasks in its [Process elements] detail in the order of their execution. The parent process instance displays the entire sub-process as a regular process task in its own [Process elements] detail. |
Completion | The [Sub-process] element is considered complete when the corresponding sub-process instance completes its execution. Upon completion, the [Sub-process] element updates its parameter values from the corresponding parameters of the completed sub-process instance and activates own outgoing flows. If any of the process parameters are mapped to a data collection, the next instance will be launched upon completion of the previous instance. Upon completion of the last instance, the [Sub-process] element updates its parameter values from the corresponding parameters of the completed sub-process instance and activates own outgoing flows. Read more in the “Working with collections” article. |
Note
The actual version of the process used as the sub-process can be found in the [Versions] detail of the [Process versions] tab, when you select this process in the Process Library record list and click [Properties].
[Sub-process] element parameters
Which process to run? | Specify a business process to use as the sub-process:
– opens the process selected as a sub-process in a new Process Designer window. Note that to be eligible as a sub-process, a business process must start with a [Simple] start event. |
Process parameters | When you select an existing Creatio process from the list, the parameters of the selected process are displayed in this block of the [Sub-process] setup area. You can populate the parameter values to run the sub-process with these values. During the execution of the sub-process, these values can be populated or updated, based on the logic of each specific sub-process. You can also map subsequent elements of the parent process to these parameters. To add/edit/delete the element parameters, use the diagram of the process selected in the [Which process to run?] field. Before making any changes to a business process, which is used as a sub-process, make sure that such changes will not affect other processes. For example, if you edit data type of a parameter and change it from the “Lookup” value to “Boolean” in a business process, this may lead to errors in any processes that use it as a sub-process. You can view the list of other processes that use the current sub-process as their element in the [Used as sub-process in processes] detail of the [Launch options] tab, when you select this process in the Process Library record list and click [Properties]. If this process has any sub-processes of its own, they will be displayed in the [Sub-processes] detail of the [Sub-processes] tab. |
See also