The Workflow Node allows a Workflow to call another Workflow. This is comparable to a function calling another function in code and permits re-use of Workflows.

To add a Workflow to your current Workflow, click + on the Workflow Design Canvas. In the Choose Node or Workflow dialog that displays, click the Workflow  tab and select a Workflow.

The chosen child Workflow will be presented on the Design Canvas as a Node and the input and output properties defined in Variable Bar's on the child Workflow will display as Properties on the Node.

If you change Properties in the Variable Bars of the child Workflow, you can refresh them in the parent Workflow by clicking the Node Header options button and choosing Refresh Properties.

You can also open the child Workflow by choosing Open Workflow from the Node Header options menu.

Parallel Workflows

Click Enable Parallel Mode to allow multiple child Workflow invokes to occur in parallel. This pattern is useful when you want work to complete as quickly as possible.

How Parallel Invokes Work

You should use parallel mode Workflow Nodes downstream from an iterator such as For Each or Loop.

When parallel mode is enabled, the UI will be changed to show a slider representing the maximum number of instances of the Workflow that will be allowed to execute in parallel.

When the parent Workflow runs and encounters a child Workflow configured for parallel mode, the child Workflow will be spawned as a new task and execution of the parent Workflow will immediately be returned to the nearest upstream iterator (e.g. For Each Node).

The slider controls the maximum number of parallel instances of the sub-Workflow and can be scaled between 2 and 10.

Restrictions

When a Workflow is configured to run in parallel mode, none of the execution or data outputs will be available. If you need to perform additional steps after all parallel execution has completed, use the Finished output of the nearest upstream iterator.

If you need to collate output data across multiple Workflow instances, use the Key Value Nodes to store the data within the child Workflow.

Parallel Processing and Active Workflows

In parallel mode, calls to a child Workflow run on their own thread and therefore each instance is an Active Workflow. You should consider the impact on overall Active Workflows when configuring child Workflows to execute in parallel.

When a child Workflow is about to be invoked in parallel mode, Flowgear first checks there is at least one available Active Workflow slot. If no slot remains based on the subscription the Site is allocated in to, the execution will pause until a slot becomes available.

See https://flowgear.me/#s/qyRZ39v for an example of how to implement a Parallel Workflow.

See Also

Variable Bar

Did this answer your question?