- 11 Feb 2025
-
DarkLight
-
PDF
Decision Task Replaced by Evaluation Task
- Updated on 11 Feb 2025
-
DarkLight
-
PDF
Breaking Change Notice
The decision
task is no longer supported in the workflow canvas for the Platform 6 release. You will need to replace it with the Evaluation
task.
What should I do?
Since the decision
task acts as an evaluator, use the Evaluation
task to define a set of conditionals and execute a success/failure transition in the workflow. Before explaining how to use the Evaluation
task in GEN 2, let's lay some groundwork by discussing how the decision
task worked prior.
Figure 1 shows a decision
task that takes in a color (string) and matches it to either red, green, or blue to "decide" (evaluate) which stub
task to transition to in the workflow. In this scenario, the decision
task acts as a set of evaluations.
Figure 1: Decision Task GEN 2 Canvas (Deprecated)
With the decision
task, a set of conditional expressions also were defined for each subsequent task (Figure 2). Users could choose if “any” (at least one) or “all” of the conditions must pass in order to transition to that task. Conditionals are evaluated in order (serially), so that the first task with all conditions met is the task that is selected to run. If no conditions were met, then a “default” transition was used. In Figure 1, the “default” transition was drawn to the End
of the workflow.
Figure 2: Conditionals
Using the Evaluation Task
To achieve the same branching effect, replace decision
with a set of Evaluation
tasks as shown in Figure 3. For each Evaluation
task, you can place the same condition that was used in the decision
task along with a success transition (green) to the stub
task. A failure transition (purple) is used to transition to the next Evaluation
task. A final failure transition from the last Evaluation
task is used to create a “default” transition to the End
of the workflow.
Figure 3: Evaluation Task GEN 2 Canvas (Replacement)
Figure 4 shows a snippet of input sources (operands) for the Evaluation
task. Notice how the evaluation criteria is the same as the “Red” evaluation (“Does the ‘color’ job variable equal the static value ‘red’”) from the decision
task in Figure 2.
Figure 4: Evaluation Task Operand Data
Data for conditional expressions can come from input job variables, previous task outputs, or static values. A conditional operator is selected along with the data to compare it against. Below is a list of conditional operators that are allowed when the Evaluation
task is used:
- “contains”
- “does not contain”
- “equals”
- “does not equal”
- “greater than”
- “greater than or equal”
- “less than”
- “less than or equal”