Table of Contents

Enum WorkflowInstanceState

Namespace
Millrace.Storage
Assembly
Millrace.dll

Lifecycle states of a workflow instance (ARCHITECTURE.md ยง6).

public enum WorkflowInstanceState

Fields

Running = 0

Activities are in flight, or ready to be dispatched.

Includes a saga that is unwinding: compensations are dispatched as ordinary activities, so an instance busy undoing its work is still Running. What distinguishes the two is SagaState.Compensating on the cursor, not this field.

Suspended = 1

Waiting on a signal bookmark or parked for operator action; no job exists.

Completed = 2

Reached the end of its graph. Terminal.

Failed = 3

Stopped on a failure, with whatever had already been done left in place. Terminal.

Reached three ways: there was nothing to undo, a step's failure policy said the earlier work should stand, or an operator abandoned a stalled unwind. The common thread is that partial work survives โ€” which is exactly what separates this from Compensated.

Compensated = 4

A saga unwound completely: every step it had finished was compensated. Terminal.

Kept distinct from Failed because the two differ in the only way that matters to whoever reads the record later โ€” one leaves partial work behind and the other does not.

Cancelled = 5

Cancelled before reaching an end of its own. Terminal.