Description:
This step separates functionality into child instances and executes them separately from the parent instance.
Inputs
- name - the name of the step
- definition to use – definition to instantiate from
- passVariablesToChild – passes variable values from parent to child instance. Make sure the child instance has the same variables, named the same as the parent variables
- passVariablesBackToParent – passes the variable's values back to the parent from the child instance
- passGlobalsToChild - Pass globals to child instance
- passGlobalsBackToParent - pass globals back to parent
- parentToChildVariableMapping - map the variables from child to parent workflow
- parentToChildGlobalMapping - map the globals from child to parent workflow
- isSynched – Yes = parent waits until child instance is completed to execute, No = parent instance does not wait for the child instance to complete, parent instance continues execution
- executionPriority -Select execution priority
- childToParentVariableMapping - map the variables from parent to child workflow
- childToParentGlobalMapping - map the globals from parent to child workflow
Returns
- True – step executed successfully
- False – step failed to execute
Usage:

Example:
Let’s build and execute the “subWorkflowDef” example.
- Create a new definition called “subWorkflowDef” and open the definition in designer mode.
- Drag the “updateVariables”, “updateGlobals,” “subWorkflow”, “decision,” and “placeholder” controls to the canvas
- Connect the dots between the “Start” and other steps, as shown above.
- Define the variables or globals to store the values.
- Click the "updateVariables" step to configure its "Required" properties. Provide a name for the step. Navigate to the “Optional” tab. Click the icon and provide values to multiple variables. A pop-up window is displayed for configuration. Click the Add Row button to insert an empty row. Provide the variable name and value. Click the Save button. You may add multiple variables using the Add Row button.

- Click the "updateGlobals" step to configure its "Required" properties. Provide a name for the step. Navigate to the “Optional” tab. Click the icon and provide values to multiple globals. A pop-up window is displayed for configuration. Click the Add Row button to insert an empty row. Provide the global name and value. Click the Save button. You may add multiple globals using the Add Row button.

- Click the "subWorkflow" step to configure its "Required" properties. Provide a name for the step. Select the process definition as a separate function from the dropdown list. Click the Save button.

- The process definition configured as a sub-workflow in this example has this workflow

- Click the "evalExpression" step to configure its "Required" properties. The expression computes the variables and global values passed to the subworkflow during runtime.

- Click the "subWorkflow" step to configure its "Optional" properties. Configures “Yes” to pass variables to the child instance. Configures “Yes” to pass variable values back to the parent instance. Configure “Yes” to pass globals to the child instance. Configure “Yes” to pass global values back to the parent instance. Click the button to map “parent-to-child” variable values to and fro. Click the button to map “parent-to-child” global values to and from. Set “Yes” to “Is Synchronized” if a parent should wait until the child instance is completed before executing. Configure “No” if the parent instance does not wait for the child instance to complete; the parent instance continues execution. Select execution priority from the dropdown list - “low, medium, high.”

- Click the button to map the “parent-to-child” variable mapping. Click the “Add Row” icon to add new rows to map sub-process variables with parent process variables or values.

- Click the button to map “parent-to-child” global mapping. Click the “Add Row” icon to add new rows to map sub-process globals with parent process globals or values.

- Click the button to map the “child-to-parent” variable mapping. Click the “Add Row” icon to add new rows to map sub-process variables with parent process variables or values. Note: You can map sub-process globals with parent process variables when you have to swap values between globals and variables.

- Click the button to map “child-to-parent” global mapping. Click the “Add Row” icon to add new rows to map sub-process globals with parent process globals or values. Note: You can map sub-process variables with parent process globals when you have to swap values between globals and variables.

- Click the "decision" step to configure its "Required" properties. Provide a name for the step. Provide the expression to evaluate.

- Click the link connection properties and configure the workflow's “True” and “False” process paths.

- Save the process definition, create a new instance, and then execute it. Render the process instance. To render the child process instance, click the navigation icon (black color) on the sub-workflow step.

- The child process instance is rendered in a new tab.

Definition Sample:
You may download the sample definition(s) from the link here and later import them (drag-and-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: Please verify and complete the process steps for any missing configurations, such as file path references and database connections, after import. Then, save the definition to confirm the changes.