This task allows you to add workflow control. The conditional logic defined in this task yields two or more branches and switch paths to take based on the output values of the condition.
Double-click the Decision Branch task and enter the following properties:
Title: Double-click the default title Decision Branch Task to change the title.
Description: Enter the required task description.
Go to Task: Depending on the value fetched from the following when query, select the task that the workflow should flow to.
The get_value is a function that is exposed from the backend to read variables from previous tasks. In your case, you need to add the workflow variables for each bash node that is connected to the decision node and provide the value for it as 'success'.
If the tasks that are connected to the decision node are executed successfully, the value for these status variables will be set to success and you can use these variables in the decision node to decide the downstream node should be executed.
See the example below
a) I have created the below workflow variable to set the status value as 'success' when the execution of this node is successful.
b) Add similar workflow variables for the other bash nodes that are connected to the decision branch node.
c) Double click the decision branch node>Run time settings and select the option "All immediate parents execution is done".
By default, the first option would be selected "All immediate parents are succeeded". If this default option is selected, the decision node logic will not be executed/evaluated if one of the parent nodes fails.
d) In the decision node, you can use the below logic.
The execution will go to "All nodes success" if all the previous nodes are executed successfully (ie. all the workflow variable values are set to success).
The execution will go to "Anyone or all nodes failure" if any one of the bash nodes or all the bash nodes connected to the decision node fails.
Applicable Infoworks versions: