Reference
Execution States
Every layer of the execution hierarchy — Process, Thread, and Element — tracks
its current state using the eExecutionState enum. This page documents
all valid states, their meanings, and valid transitions.
eExecutionState Enum
| State | Meaning | Terminal? |
|---|---|---|
Idle | Created but not yet started. The initial value before execution begins. | No |
Running | Actively executing. Nodes are being dispatched. | No |
Completed | All nodes finished successfully. The normal success terminal state. | Yes |
Failed | An unrecoverable error occurred. Retries (if any) were exhausted. | Yes |
Cancelled | The CancellationToken was signalled, or a WorkflowControl node issued an abort signal. | Yes |
Paused | Execution is durably suspended. A node returned "waiting" or "pending". | No — can resume |
State Machine Diagram
stateDiagram-v2
direction LR
[*] --> Running : Start
Running --> Completed : Success
Running --> Failed : Error
Running --> Cancelled : Abort / Token
Running --> Paused : Waiting / Pending
Paused --> Running : ContinueAsync
Completed --> [*]
Failed --> [*]
Cancelled --> [*]
State Transitions by Layer
Thread State Transitions
Idle → Running (on ExecuteProcessThreadAsync entry)
Running → Completed (loop exits with stack empty, no errors)
Running → Failed (node threw, retries exhausted, or thread exception)
Running → Cancelled (CancellationToken signalled or AbortSignal set)
Running → Paused (node returned "waiting"/"pending", or pause API called)
Paused → Running (on ContinueAsync resume)
Process State Transitions
Running → Completed (all threads completed)
Running → Failed (any thread failed — stops processing remaining threads)
Running → Cancelled (CancellationToken signalled mid-thread-loop)
Running → Paused (pause signal received between threads)
Node Stage Enum (eNodeStage)
Below the eExecutionState, individual node execution progress is tracked
through eNodeStage. Each stage transition is reported via the progress
event system and visible in the Studio UI.
| Stage | When fired |
|---|---|
Initiated | Execution has started, before OnEntry |
Entry | OnEntry completed |
EntryValidate | OnEntryValidate completed |
PreValidationGuardRails | OnPreValidationGuardRails completed |
PreProcess | OnPreProcess completed |
Process | OnProcess completed |
PostProcess | OnPostProcess completed |
PostValidationGuardRails | OnPostValidationGuardRails completed |
Exit | OnExit completed |
Completed | Result.IsSuccess == true — node finished successfully |
Error | Result.IsSuccess == false — node reported failure |
ExecutionStatusID Constants
When thread executions are persisted to the database, the state enum is mapped
to integer status IDs via ExecutionConstants.ExecutionStatusId:
| Constant | Maps from |
|---|---|
Completed | eExecutionState.Completed |
Failed | eExecutionState.Failed |
Cancelled | eExecutionState.Cancelled |
Paused | eExecutionState.Paused |
Running | eExecutionState.Running |
Paused is not Failed
A paused execution is healthy — it is waiting for an external event.
Treat it like a running execution that is temporarily sleeping.
Only
Failed and Cancelled indicate that something went wrong.