Member Junction
    Preparing search index...
    • What a saga does next, from the rows alone. Walks the plan in order:

      • no compensation task for a step yet → create it (Compensate), one at a time;
      • a compensation task still Pending or In Progress → Wait;
      • a compensation that Completed → next step;
      • a compensation that failed, by its onCompensationFailure:
        • 'ContinueCompensation' → next step (the saga ends CompensationFailed);
        • 'HaltSaga' → stop: Finished with CompensationFailed;
        • 'EscalateToHumanTask' (default) → create a Human step (Escalate) and wait on it. When the person completes it, they have undone the step by hand and the saga resumes with the next step; when the Human step ends any other way (cancelled, skipped, failed, expired), the saga stops: Finished with CompensationEscalated.

      Type Parameters

      Parameters

      • args: {
            CompensationFor: (forwardTaskID: string) => T;
            EscalationFor: (compensationTaskID: string) => T;
            Plan: readonly CompensationPlanEntry<T>[];
        }

      Returns SagaStep<T>