SagaCompensator class
Executes saga compensation (rollback) for failed workflow executions.
When a workflow execution fails, the compensator:
- Transitions execution to COMPENSATING status
- Finds all COMPLETED steps with registered compensate functions (reverse order)
- Executes each compensation function
- Records COMPENSATED checkpoint for each
- Transitions execution to FAILED status
Constructors
- SagaCompensator({required CheckpointStore store})
- Creates a SagaCompensator.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
compensate(
String workflowExecutionId, Map< String, Future< compensateFunctions, {Map<void> Function(dynamic)>String, dynamic> compensateResults = const {}, void onCompensateError(String stepName, Object error)?}) → Future<void> - Runs saga compensation for the given execution.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited