Skip to main content
Example Use-Cases: Content type routing, topic-specific processing, quality-based decisions Conditional workflows provide predictable branching logic while maintaining deterministic execution paths. Workflows condition steps diagram

How It Works

The Condition class evaluates a function and executes different steps based on the result:
  • If branch (steps): Executes when the evaluator returns True
  • Else branch (else_steps): Executes when the evaluator returns False (optional)
If the condition is False and no else_steps are provided, the condition is skipped and the workflow continues to the next step.

Basic Example

conditional_workflow.py

If/Else Branching

Use else_steps to define an alternative execution path when the condition is False:
condition_with_else.py

Developer Resources

Reference

For complete API documentation, see Condition Steps Reference.