Parallel Flow Launcher example

reference brazil Updated Sep 10, 2026 1 min read r_ParallelFlowLauncherExample.md
Raw file servicenow.com

This example shows how to use the Parallel Flow Launcheractivity with an array of input values and with a WorkflowCoordinator object.

Sample workflow

This example shows a SQL-based web server with four application nodes. A single subflow runs to provision the database, and multiple parallel subflows each configure an application node. Finally, a separate set of parallel subflows configures the nodes to use a load balancer and sets up the server DNS.

[Omitted image "WFExampleParallelMainFlow.png"] Alt text:

Provision the application nodes

The first Parallel Flow Launcheractivity launches the Provision Node subflow four times. The activity passes a unique IP address to each subflow from an array in the Inputs variable. The scripts defined in the Flow complete and Finished script variables write log messages regarding the status of the subflows.

[Omitted image "WFParallelActivityDetail.png"] Alt text:

Add nodes to the load balancer

The second Parallel Flow Launcher activity uses WorkflowCoordinator objects to specify which subflows to run. The coordinator variable stores the completed flow information from the previous Provision Nodes activity. The script then retrieves the IP address and port for each node that was provisioned. The coord2 WorkflowCoordinator object runs the Add Node to Load Balancer subflow once for each node, using the retrieved IP address and port information as input variables. Finally, the coord2 WorkflowCoordinator object runs the SetupDNS subflow once to configure the load balancer.

[Omitted image "WFParallelActivityDetail2.png"] Alt text:

Parent Topic:Parallel Flow Launcher workflow activity

Search documentation
Search document titles and file paths on the brazil branch