Expand description
Rollback engine for workflow failure recovery using Saga compensation pattern.
The rollback engine provides selective rollback of dependent tasks using DAG backward traversal. When a task fails, only its dependents are rolled back, leaving independent tasks in their completed state.
§Saga Compensation Pattern
Rollback uses the Saga pattern where each task optionally provides a compensation action that undoes its side effects:
UndoFunction: Executes a compensating transaction (e.g., delete created file)Skip: No compensation needed (read-only operations like queries)Retry: Recommends retry instead of compensation (transient failures)
§Rollback Strategies
AllDependent: Roll back all tasks reachable from failed task (default)FailedOnly: Roll back only the failed taskCustom: Use provided filter function for selective rollback
Structs§
- Compensation
Registry - Registry for tracking compensation actions for workflow tasks.
- Compensation
Report - Report from compensation coverage validation.
- Executable
Compensation - Extended compensation action with undo function support.
- Rollback
Engine - Rollback engine for workflow failure recovery.
- Rollback
Report - Report from rollback execution.
- Tool
Compensation - Compensation action for external tool side effects.
Enums§
- Rollback
Error - Errors that can occur during rollback.
- Rollback
Strategy - Rollback strategy for determining which tasks to roll back.