Adding the Switch step for selecting a further execution path
With the Switch control step, you can define conditions for selecting the further execution path in your workflow. This way, only one path can be selected: the one where the defined condition first returns true.
If all conditions return false, the workflow will be executed for the path specified in the default condition; if there is no default condition, the workflow execution will fail.
-
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
Switch element to desired 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 added Switch 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.
-
-
Optionally, navigate to the Input tab and set a jq template to filter the workflow state fed into the step.
-
To add a new execution branch:
-
In the bottom-right corner of the Switch section, click
. -
In the window that opens, add a condition for selecting the execution branch. To specify the condition, use the jq format. To add the default condition, enable Default condition. The default condition is created automatically if Switch is not the first step in the workflow. Once the condition is added, click Create.
To delete an execution branch, add any integration step to it and delete that step using
. -