
How It Works
TheCondition class evaluates a function and executes different steps based on the result:
- If branch (
steps): Executes when the evaluator returnsTrue - Else branch (
else_steps): Executes when the evaluator returnsFalse(optional)
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
Useelse_steps to define an alternative execution path when the condition is False:
condition_with_else.py
