Expand description
Execution rollback mechanism for workflows
This module provides the ability to create snapshots of execution state and rollback to previous states when needed.
§Features
- Create point-in-time snapshots of execution state
- Store execution history with automatic pruning
- Rollback to any previous snapshot
- Support for selective rollback (specific variables, node results)
§Example
use oxify_model::rollback::{ExecutionSnapshot, RollbackManager};
use oxify_model::execution::ExecutionContext;
use uuid::Uuid;
let mut manager = RollbackManager::new(10); // Keep 10 snapshots max
let mut context = ExecutionContext::new(Uuid::new_v4());
// Create a snapshot before risky operation
let snapshot = ExecutionSnapshot::from_context(&context);
manager.push_snapshot(snapshot);
// If operation fails, rollback
let result = manager.rollback(&mut context);
assert!(result.success);Structs§
- Execution
Snapshot - A point-in-time snapshot of execution state
- Rollback
Manager - Manages execution snapshots and rollback operations
- Rollback
Result - Result of a rollback operation
- Rollback
Summary - Summary of rollback manager state
- Snapshot
Metadata - Metadata about a snapshot