Suspension & Resume
BizFirst workflows can durably pause mid-execution and resume later — across server restarts, after minutes or days. This is how approval gates, delay nodes, form fills, and external event waits work. Understanding suspension is critical for building any node that involves a human or an external system response.
What Triggers Suspension?
Any node executor can trigger a durable suspension by returning a
NodeExecutionResult with an output port key of "waiting"
or "pending".
When the thread orchestrator's output routing step sees one of these port keys, it does not
route to downstream nodes. Instead it serializes state, stores it, sets a pause signal,
and transitions the thread to Paused.
The Suspension Flow
What Gets Saved
SuspendedExecutionData contains everything needed to resume:
| Field | Purpose |
|---|---|
ExecutionResId | Unique identifier for this execution — used to look it up on resume |
ThreadVersionId | Which thread version was executing |
SuspendedNodeKey | The ProcessElementKey of the node that triggered suspension |
Memory | The full ExecutionMemory — all variables, node outputs, loop state, scope stack |
ExecutionID | The thread execution's ID for correlation |
ExecutorID | ProcessThreadID and related IDs for reloading the thread definition |
InputData | The original trigger data |
CompletedNodeCount | Progress counter at the time of suspension |
SuspendedAt | Timestamp for SLA tracking and expiry logic |
TenantId | Multi-tenant isolation |
ParentProcessContext | Reference to the parent process for resuming the full hierarchy |
Types of Suspension
Approval / HIL
The workflow presents data to a human actor and waits for approve/reject/modify input. Uses "waiting" port. The HIL payload is built from the node's NodeFieldManifest HilPolicy descriptors.
Delay / Timer
The workflow pauses for a configured duration. A PendingDelay record is scheduled. A background service fires the resume when the time arrives.
Form Fill
A URL to a rendered form is returned. The workflow pauses until the form is submitted. Uses "pending" port. Form data is merged into the input bag on resume.
Event Wait
The workflow waits for a specific external event matching a correlation key. When a matching event arrives (via API or Kafka), the correlation service triggers the resume.
HIL — Human in the Loop
HIL suspension is the most sophisticated type. When a node suspends for human review,
it builds a HIL payload — a description of the fields the human
should see and interact with. This payload is constructed from the
NodeFieldManifest's HilPolicy descriptors:
SendToHil = true— field is included in the payload.DisplayMode—ReadableContext(shown as info),ReadableMasked(shown but value hidden),Concealed(hidden entirely).InputMode—Locked(read-only),EditableOptional(can edit),RequiredFromHuman(must provide),PrefilledEditable(pre-filled but editable).Label/Description— human-readable text. Can be dynamic expressions evaluated byIHilLabelResolver.
For full HIL label and policy details, see the HIL Labels page in the Expression Engine documentation.
ISuspendedExecutionRegistry ensures suspended executions
survive server restarts. The in-memory registry is only appropriate for unit testing.
Always ensure the SQL registry is registered in production.