Resuming the Engine
IWorkflowContinuationOrchestrator re-loads the suspended state, merges the actor's response, and restarts execution from the HIL node's downstream. The engine does not re-execute nodes that have already completed.
Continuation Steps
Load suspended execution
HILResumeService loads the row from Process_SuspendedExecutions. Deserialises ExecutionMemory from JSON.
Mark token as consumed
Sets ResumedAt on the suspended execution row — prevents double-resume before continuation begins.
Merge response data
Actor's responseData is written to ExecutionMemory.nodeOutputs[suspendedNodeId].
Resolve output port
Based on response (e.g., Approved → approved port), the engine identifies which downstream edges to follow.
Continue execution
IWorkflowContinuationOrchestrator.ContinueAsync() resumes the engine from the identified downstream nodes. Normal execution proceeds.
Nodes Not Re-Executed
The engine uses the restored ExecutionMemory.nodeOutputs map to know which nodes have already run. Any node whose output is already in the map is skipped — only nodes downstream of the HIL node (on the selected port) are executed fresh.
IWorkflowContinuationOrchestrator
public interface IWorkflowContinuationOrchestrator
{
Task ContinueAsync(
ExecutionMemory restoredMemory,
string processId,
string threadId,
string startFromNodeId, // the HIL node
string startFromPort, // the resolved output port
CancellationToken ct);
}