The evaluation task replaced the decision task deprecated in the Gen 2 workflow canvas for 2023.2. See the Breaking Change: Decision Task Replaced.
The evaluation task controls workflow execution paths based on runtime conditions. Use this task to compare values and determine which path your workflow should follow.
When the task’s conditions are met, the task outputs true and execution continues through any success transitions. Otherwise, the task outputs undefined and execution continues through any failure transitions.
This page covers setting the task condition, constructing evaluations, and using operators with different data types.
If you’re migrating workflows from Platform 2022.1 to Platform 2023.1 or later, be aware of a change in how the evaluation task displays its output when the fail path is taken.
This change affects only how the outcome appears in the job/task view and API responses, not how your workflow executes. When validating migrated workflows, check the transition path to confirm whether the success or fail path was taken, rather than relying on the return value field.
By default, the evaluation task automatically performs type inference and coercion:
"500" is converted to the number 500.You can disable type coercion by enabling Strict Types mode. When enabled, the task compares operands exactly as provided without any type conversion.
The following example shows how the != operator behaves differently based on the strict types setting:
Enable strict types when you need predictable string comparisons without automatic type conversion.
Evaluations are expressions consisting of two operands (A and B) and a comparison operator. When the task runs, it compares operand A to operand B and yields true or false.
By default, evaluations display vertically. To display them horizontally, click Expand at the top-right of the task configuration window.
All evaluations belong to an evaluation group. Each group resolves to true or false by logically combining its evaluation results. Each group has its own conditional statement that works the same way as the task condition.
If operand A is an array or object, you can use a query to determine its value:
At runtime, the query executes and its results become the value of operand A.
Operator behavior depends on the data types of the operands.
>)<)==)!=)>=)<=)containscontainscontains