How to pass parameters between business processes
Bpm’online business processes can exchange information with each other using process parameters. Such exchange is possible between a sub-process and corresponding parent processes only.
Parameters of the subordinate process become parameters of the corresponding [Sub-process] element of the parent process. When you populate the [Which process to run?] field of the [Sub-process] element, its setup area displays the parameters of the selected process (Fig. 1) The values of these fields can then be populated with static values or mapped to other parameters from the parent process. Likewise, parameters of the parent process and its elements can be mapped to parameters of the [Sub-process] element.
For example, a process for job applicant review includes a sub-process, during which the applicant is reviewed by the company management. You can pass the contact’s Id to the sub-process using the [Lookup] process parameter (Fig. 2).
To transfer parameter values between a sub-process and its parent process:
1.Add corresponding parameter(s) to the sub-process.
2.Map the parameters of the parent process and/or its elements to the parameters of the [Sub-process] element.
Adding a parameter to the sub-process
To add a parameter to the business process:
1.Open the sub-process in the Process Designer.
2.In the process setup area, go to the [Parameters] tab.
3.Click [Add parameter] and select its type. For example, if you need to pass a specific record as parameter value, you would need a [Lookup] type parameter.
Note
The record will be passed to this process, therefore this parameter will be populated with a value from the parent process. The setup of the parent process is described below.
4.Populate the [Title] and [Code] fields so that you can easily identify this parameter in the future, e.g., when mapping its values.
5.For a lookup parameter you need to specify the object whose records can be used to populate this parameter. In the [Lookup] field, select the object whose records will be used to populate parameter values. For example, if your parameter is supposed to link a process to a contact record, select the “Contact” (Fig. 3).
6.Save the parameter and the process.
Once the lookup parameter is added to the business process, it has to be mapped in the parent process.
Mapping parameter values of parent process to parameters of a sub-process
To map the parent process parameter:
1.Add a [Sub-process] element to the process diagram (Fig. 4):
2.In the [Which process to run] field, select the subordinate process, which will be run as part of the current process. For example, in the “Onboarding” process, add sub-process element and select the “CEO review” process as the sub-process.
As a result, the parameters of the selected process will appear in the setup area of the [Sub-process] element. For example, the [Contact] parameter will appear once you select the “CEO review” process (Fig. 5).
3.In the [Process parameters] area, click the button next to the parameter to map (Fig. 6).
4.In the window that appears, select the element that contains the needed parameter. For example, if the parent process is triggered by an object signal and you need to map the parameter to the record that triggered it, select the corresponding signal element (Fig. 7).
5.A list of the element parameters will appear to the right. Select the parameter that contains the needed value. For example, if you are mapping a lookup parameter to an object signal, select the [Unique identifier of record] parameter (Fig. 8).
6.Save the process
As a result, whenever the sub-process is executed, its parameters will obtain values from the parent process. For example, the contact that triggered the start of the parent “Onboarding” process will be passed to the child “CEO review” process.
See also