Member Junction
    Preparing search index...
    SagaStep:
        | { Kind: "Wait" }
        | {
            Compensation: TaskCompensationStepMetadata;
            Forward: T;
            Kind: "Compensate";
        }
        | { FailedCompensation: T; Forward: T; Kind: "Escalate" }
        | { Kind: "Finished"; State: SagaExecutionState }

    What the dispatcher does next for a saga.

    Type Parameters

    Type Declaration

    • { Kind: "Wait" }

      A compensation or an escalation is still running, or a forward step is still finishing.

    • { Compensation: TaskCompensationStepMetadata; Forward: T; Kind: "Compensate" }

      Create the compensation task for this forward step.

    • { FailedCompensation: T; Forward: T; Kind: "Escalate" }

      Create the Human step that asks a person to undo this forward step by hand.

    • { Kind: "Finished"; State: SagaExecutionState }

      Nothing more to do; the saga ended in this state.