Pattern 54 / WORKFLOW

Compensating Transaction

Use this when Undoing a multi-step workflow when one step fails.

Pressure
Undoing a multi-step workflow when one step fails
Mechanism
Define forward actions and semantic reversals rather than relying on database rollback
Toll
Compensation may be partial, delayed, or business-specific rather than a true undo
Architecture plate54
Diagram for Compensating Transaction
Executive brief

Compensating Transaction fits when Undoing a multi-step workflow when one step fails. Mechanism: Define forward actions and semantic reversals rather than relying on database rollback. Use it for Bookings, refunds, provisioning, inventory reservations. The toll: Compensation may be partial, delayed, or business-specific rather than a true undo.

Use when

Bookings, refunds, provisioning, inventory reservations.

Example

Use compensating transaction when bookings, refunds, provisioning, inventory reservations..

Review framing

Describe the pressure first, then the mechanism, then the cost. That keeps the design grounded.

Same pressure family

Consistency / Workflow

โ† 5355 โ†’