Passing Variables Between Parent and Child Workflows
Passing Variables Between Parent and Child Workflows
When using Run Workflow activities, you can access variables from both the parent and child workflows.
Using a Parent Workflow Variable in a Child Workflow
To refer to a variable that was created in the parent workflow use: %parent.variable_name%.
How it Works
- The Parent Workflow runs a child workflow named Child.
- The Parent Workflow contains an activity that stores a variable. For example,
cpu1. - The child workflow can reference
cpu1using:
%parent.cpu1%
- If there is a second variable, for example
setmemory1, the child workflow can access it using:
%parent.setmemory1%
The child workflow can use these variables in its own activities.
For example, the child workflow may have an activity DisplayValue. In this activity, you may write %cpu1% in the Value field.
Using a Child Workflow Variable in Parent Workflow
To use a variable from a child workflow in a parent workflow, use:
%run_workflow_activity_name.variable_name%
How it Works
- The Parent Workflow runs a workflow called Child.
- The Child workflow retrieves information and stores it in a variable. For example:
userdata. - The Parent Workflow can access the
userdatausing:
%child.userdata%