Adding parallel logic
The Parallel control step executes multiple branches (sequences of steps) concurrently. The result of the step is an object in which keys and values are the names of the execution branches and their outputs, respectively. Read more about the workflow state during the Parallel step.
-
When creating a new workflow or editing an existing one, in the management console, under Create workflow / Edit workflow, select
Constructor. -
From the Control steps section on the left side of the screen, drag the
Parallel element to the relevant workflow location in the constructor window.You can drag and drop steps into areas marked by the dotted line in the workflow schema, such as Add a step, etc.
-
In the workflow schema window, click the new Parallel section to select it.
-
At the right of the window, on the Settings tab.
-
In the Step name field, enter a name for the workflow step.
- Set the number of concurrent branches in the Number of branches executing concurrently field. For example, if you set it to
2while a total of 5 branches were added, no more than 2 randomly selected branches will be executed simultaneously.
-
-
Optionally, navigate to the Input tab and set a jq template to filter the workflow state fed into the step.
-
Optionally, navigate to the Output tab and set a jq template to filter the step outputs added into the workflow state.
-
To add a new execution branch:
- In the bottom-right corner of the Parallel section, click
. - In the dialog box that opens, enter the name of the branch to add. Click Create.
- In the bottom-right corner of the Parallel section, click
-
To add a new step to an execution branch, drag the step to the area marked by the dotted line under Integration steps or Control steps.