Start Workflow

Starts a child workflow with input and output arguments.

note

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.

Start workflow designer

Designer Properties#

  1. 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

    Reload Current page properties
  2. 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)

    Edit input Arguments

    Arguments(Child Workflow)

    Child workflow arguments

    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)

  3. 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)

    Edit output Arguments

    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.

Properties#

Start Workflow properties

Workflow Properties#

See Above

General Properties#

See General Properties.

Misc#

  1. Display Name See Misc.
  2. 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.

Out Error#

See Out Error.

Workflow Properties Advanced#

  1. 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 "").
  2. 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.

Example#

Stock Index search

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.