Starts a child workflow with input and output arguments.
When using Start Flow activity, we have to make sure that we don't create a circular reference. Parent calls child1, child1 calls child2 and child2 calls child1.
Workflow to run The child workflow to be run. All the project workflows except the current one are displayed in the above dropdown. To create a workflow, open the Solution Explorer panel, right click on the project "Add new Workflow", and a new workflow will be created with the name specified in the next input control. For more details about solution explorer, please check Solution Explorer
Input Arguments The input arguments to be sent to the child workflow. The name of the arguments must match the name of the arguments from the child workflow, and the direction should be In(which is set by default). For Assign To we can use a static value(as below) or a variable.
Edit Input Arguments(Parent workflow)
As you may notice, from above screenshots, the name of the input parameter in Edit Input Arguments matches the name of the input argument(stockIndex) in Arguments(Child Workflow)
Output Arguments The output arguments to receive the result from the child workflow. As for the input arguments, the name of the output arguments must match the name of the output arguments from the child workflow, and the direction should be Out(which is set by default).
Edit Output Arguments(Parent workflow)
As you may notice, from above screenshots, the name of the output arguments in Edit Output Arguments matches the name of the output argument(result) in Arguments(Child Workflow), and the direction is Out.
See General Properties.
- Display Name See Misc.
- Result The resulting arguments from the child workflow as a Dictionary(string, object); where the key is the name of output argument from the child workflow(as detailed for Output Arguments), and the value is the corresponding value. The result gives us direct access to the result of the invoked workflow, but is recommended to use the Out Arguments.
See Out Error.
- File Path Override Overrides the Workflow to run property to allow us to run any workflow available on the disk by specifying the path here(as an expression under "").
- Input Override Overrides the Input Arguments property and allows us to specify the input arguments as Dictionary(string, object); where the key is the name of input argument from the child workflow(as detailed for Input Arguments), and the value is the corresponding value.
In this example, we search for a stock index using a child workflow which is started with the "Start Workflow" activity. As detailed above, the name of the arguments must be the same between Input/Output arguments and the child workflow arguments. When setting the input arguments, we can use variables or set the value to a constant value, like in this example.