User-Controlled Branching
Whenrequires_confirmation=True, the condition pauses for user decision:
- Confirm: Execute the
stepsbranch (if branch) - Reject: Behavior depends on
on_rejectsetting
Parameters
| Parameter | Type | Description |
|---|---|---|
requires_confirmation | bool | Pause for user decision |
confirmation_message | str | Message shown to the user |
on_reject | OnReject | Action when rejected |
OnReject Options
| Value | Behavior |
|---|---|
OnReject.else_branch | Execute else_steps (default) |
OnReject.skip | Skip the entire condition |
OnReject.cancel | Cancel the workflow |
Branch Execution
| User Action | on_reject | Result |
|---|---|---|
| Confirm | any | Execute steps |
| Reject | else_branch | Execute else_steps |
| Reject | skip | Skip condition, continue workflow |
| Reject | cancel | Cancel workflow |
Without else_steps
If noelse_steps are defined and user rejects with on_reject=OnReject.else_branch, the condition is skipped:
Combining with Evaluator
Whenrequires_confirmation=True, the evaluator is ignored. The user’s decision takes precedence: