A process workflow can be configured to execute the sub-workflow synchronously or asynchronously. The sub-workflows can be nested at many levels as long as there is no circular reference.
Drag a Task and a sub-workflow step to the process designer canvas and connect the steps as shown below.

Select the Required tab. Provide a name for the sub-workflow. Select the process definition from the drop-down list. Click Save to confirm the changes. Click the "AI Predict" button for the Copilot to add new process steps that match your process description. The workflow is now ready to execute the sub-workflow with minimal configurations, as shown below.

Select the Optional tab. Select “Yes” to pass variables from the parent process instance to the child instance. Select “Yes” to pass variables back to the parent instance from the child instance. Select “Yes” to pass the globals from the parent process to the child instance. Select “Yes” to pass the globals back to the parent instance from the child instance. Click the button to map variables and globals between the parent and the child instance. Select “Yes” to Synchronize - the parent instance waits for the child instance to complete. Select “No” to Asynchronize - the parent instance continues execution and does not wait for the child instance to complete. Select execution priority from the drop-down list. Click the button to map variables and globals between the child and the parent instance.

On the Optional tab, click the button to map the parent-to-child variables. Click the (+) Add Row to include an empty line item. Provide the parent process variables (or value) and the mapping sub-process variables. Click the Save button. Use the Add Row button to insert multiple mappings. You can map the parent-to-child globals using the UI.

On the Optional tab, click the button to map the child-to-parent variables. Click the (+) Add Row to include an empty line item. Provide the child sub-process variables and the mapping to the parent process variables. Click the Save button. Use the Add Row button to insert multiple mappings. You can map the child-to-parent globals using the UI.

Generate and execute a new Process Instance. Render the process instance on a new tab and view the latest variables. The computation was processed in the subWorkflow and passed the result to the main workflow using the step configuration.

Navigating to sub-workflows from the process designer.
The child definition configured within the “SubWorkflow” step can be opened within a process designer by just double-clicking on the icon.

Note: All dates/times are stored in UTC and displayed in the local time zone of the user.