Table of Contents

Method Saga

Namespace
Millrace.Workflows
Assembly
Millrace.dll

Saga(Action<ISagaBuilder<TData>>)

A sequence whose completed steps are undone in reverse order if a later one fails past its retry policy (§6.4).

IWorkflowBuilder<TData> Saga(Action<ISagaBuilder<TData>> steps)

Parameters

steps Action<ISagaBuilder<TData>>

Returns

IWorkflowBuilder<TData>

Remarks

Compensation is triggered by exhausted retries, not by the first exception: a step that fails transiently and then succeeds has not failed, and unwinding it would be wrong.

Each compensation runs as its own durable job with its own retry policy. If a compensation itself fails past its retries the instance is left Suspended rather than forced to a terminal state — a half-undone saga is exactly the case where an operator should look before anything else happens.