Overview
Conditional Tasks enable workflow branching based on defined rules and conditions. Each rule evaluates output parameters from previous tasks, allowing for dynamic workflow execution paths. This feature lets you create intelligent workflows that respond to data variations and task outcomes.Visual Example

Configuration Structure
Required Fields
Field | Type | Description | Required |
---|---|---|---|
name | string | Task identifier | Yes |
rules | array | Array of condition rules | Yes |
dependencies | array | Task dependencies | No |
error_policy | string | Error handling strategy | No |
Rules Configuration
Each conditional task must have one or more rules. Rules are evaluated in the order they appear in the configuration.Rule Structure
Each rule contains:- conditions: Array of conditions that must ALL be satisfied (AND operation)
- then_block: The task to execute if all conditions are met (defaults to “END” if not specified)
Condition Configuration
Condition Fields
Field | Type | Description | Required |
---|---|---|---|
task | string | Source task (must be a dependency) | Yes |
parameter | string | Output parameter from the source task | Yes |
parameter_type | enum | Data type of the parameter | Yes |
operator | enum | Comparison operator | Yes |
value | any | Value to compare against | Yes* |
Parameter Types
The following parameter types are supported:Type | Description | Example Values |
---|---|---|
STRING | Text values | ”approval”, “high”, “rejected” |
INTEGER | Whole numbers | 1, 42, -10 |
FLOAT | Decimal numbers | 0.5, 3.14, -2.5 |
BOOLEAN | True/false values | true, false |
DATETIME | Date and time values | ”2024-03-15 14:30:00” |
ARRAY | Lists of values | [1, 2, 3], [“red”, “green”] |
ENUM | Predefined set of values | ”APPROVED”, “REJECTED” |
Available Operators
The available operators depend on the data type of the selected parameter:String Operators
EQUAL
: Exact matchNOT_EQUAL
: Not an exact matchCONTAINS
: String contains valueSTARTS_WITH
: String starts with valueENDS_WITH
: String ends with valueIS_NULL
: Value is nullIS_NOT_NULL
: Value is not null
Numeric Operators (INTEGER, FLOAT)
EQUAL
: Equal toNOT_EQUAL
: Not equal toGREATER_THAN
: Greater thanLESS_THAN
: Less thanGREATER_THAN_OR_EQUAL
: Greater than or equal toLESS_THAN_OR_EQUAL
: Less than or equal toIS_NULL
: Value is nullIS_NOT_NULL
: Value is not null
Boolean Operators
EQUAL
: Equal to (true/false)NOT_EQUAL
: Not equal to (true/false)IS_NULL
: Value is nullIS_NOT_NULL
: Value is not null
DateTime Operators
EQUAL
: Equal toNOT_EQUAL
: Not equal toGREATER_THAN
: Later thanLESS_THAN
: Earlier thanGREATER_THAN_OR_EQUAL
: Later than or equal toLESS_THAN_OR_EQUAL
: Earlier than or equal toIS_NULL
: Value is nullIS_NOT_NULL
: Value is not null
Array Operators
IS_EMPTY
: Array has no elementsIS_NOT_EMPTY
: Array has at least one element
Enum Operators
EQUAL
: Exact matchNOT_EQUAL
: Not an exact match
Then Block Configuration
Thethen_block
field specifies which task to execute if all conditions in the rule are satisfied.
- If no
then_block
is specified, or if it is set to “END”, the workflow will terminate - Only tasks that have been connected to the conditional task in the workflow editor will appear in the dropdown
Common Use Cases
1. Content Routing
2. Customer Support Triage
3. Data Validation
Task Flow
Flow Execution Logic
- Rules are evaluated in sequential order (top to bottom)
- The first rule with all conditions satisfied determines the execution path
- If multiple rules could match, only the first matching rule is executed
- If no rules match, the workflow proceeds to END unless a default path is configured
Error Policies
Theerror_policy
field defines how errors are handled during rule evaluation:
Policy | Description |
---|---|
RAISE | Stop workflow execution and raise an error (default) |
RETRY | Retry the condition evaluation after a delay |
SKIP | Skip the failing condition and continue evaluation |
Best Practices
1. Rule Organization
✅ Do:- Order rules from most specific to most general
- Group related conditions
- Use descriptive names for tasks and parameters
- Test rule evaluation with sample data
- Create overlapping rules without clear precedence
- Use complex nested conditions when simpler rules would work
- Add unnecessary conditions
- Create circular dependencies
2. Condition Design
✅ Do:- Use appropriate operators for each data type
- Validate input values
- Consider edge cases
- Keep conditions simple and clear
- Mix data types in comparisons
- Use hardcoded values that may change
- Create impossible conditions
- Overcomplicate conditions
3. Workflow Integration
✅ Do:- Ensure all referenced tasks exist in the workflow
- Verify parameter names and types
- Use clear task names for easy reference
- Document rule logic for other users
- Reference tasks outside the workflow
- Use parameters that may not exist
- Create dead-end paths
- Assume parameters will always have values
Common Issues and Solutions
Issue | Solution |
---|---|
Rules Never Match | Check condition values and operators |
Wrong Branch Selected | Review rule order and specificity |
Missing Parameters | Verify task dependencies and output structure |
Type Errors | Ensure parameter values match expected data types |
Workflow Dead Ends | Connect all possible branches to appropriate tasks |
Parameter Changed | Update conditions if output parameter names change |
No Next Node Options | Connect edges to destination nodes in the workflow |