Skip to content

Function: executeFlowStep() ​

ts
function executeFlowStep<TIn, THandle>(
   flowCtx, 
   stepNode, 
   outerBranchId?
): Promise<{
  output?: unknown;
  status: "completed" | "suspended" | "rewound";
}>;

Defined in: runtime/flow/internal/execute-flow-step.ts:338

Executes a single FlowStepNode, handling .inputFrom() projection, step-level .replaceWith() promotion, and .retry() backoff (SPEC.md §3.9).

Persists completedStepOutputs and recordStepTransition in LedgerStore when the step completes, and quiesces 'scope'-scoped services and restores baseScopeCheckpoint if the step faults or aborts.

Type Parameters ​

Type ParameterDefault typeDescription
TInunknownValidated flow input payload type.
THandleunknownRuntime handle type of the active isolation scope.

Parameters ​

ParameterTypeDescription
flowCtxFlowExecutionContext<TIn, THandle>Active flow execution context.
stepNodeFlowStepNode<unknown, unknown, THandle>Passive FlowStepNode to execute.
outerBranchId?stringOptional enclosing FlowBranchNode.id for output attribution.

Returns ​

Promise<{ output?: unknown; status: "completed" | "suspended" | "rewound"; }>

Step execution outcome.

Released under the MIT License.