Portal Community

What ExecutionMemory Is

ExecutionMemory is the primary mechanism for passing data between nodes in a workflow. When a node runs and returns output, that output is written into ExecutionMemory under the node's ID. Downstream nodes read from it by calling GetNodeOutput.

ConceptDetail
ScopeOne instance per execution run. Multiple concurrent executions of the same workflow have completely independent ExecutionMemory instances.
LifetimeCreated when the execution starts; destroyed when the execution completes or fails. For HIL suspensions, serialized and stored in the database.
StorageIn-memory (not a database table). Fast, no I/O cost for reads.
AccessVia ctx.ExecutionMemory inside any executor — read-write access.
Relationship to pinned dataCompletely separate. ExecutionMemory is ephemeral; pinned data is durable.

Three Storage Areas

AreaKeyPurpose
nodeOutputsnodeId (string)Output from each node execution — the primary data bus between nodes
globalVariablesvariable name (string)Shared state any node can read or write within the execution
executionMetadatakey (string)Engine-managed fields: executionId, processId, triggeredBy, startedAt

How Data Flows Through a Workflow

Node A runs → NodeExecutionResult.Success(outputA)
BaseNodeExecutor calls ExecutionMemory.SetNodeOutput("node-a", outputA)
Node B runs → calls ctx.ExecutionMemory.GetNodeOutput<T>("node-a")
Node B uses the data, returns its own output → stored under "node-b"

Guide Contents

PageWhat You Will Learn
Memory StructureThe complete ExecutionMemory class layout and the three storage dictionaries
nodeOutputs MapHow node output is keyed, stored, and typed
Reading Upstream OutputGetNodeOutput<T> and GetPreviousNodeOutput<T> usage
Global VariablesSetGlobal and GetGlobal for cross-node shared state
Memory LifetimeWhen memory is created, when it is destroyed, and what happens on failure
HIL SerializationHow ExecutionMemory is serialized to JSON for HIL suspension and restored on resume
Memory IsolationTenant and execution-level isolation guarantees
ExecutionMemory is distinct from pinned data. nodeOutputs in ExecutionMemory is ephemeral — it lives only for the current run. Pinned data (stored in Process_NodePinnedData) survives across runs. Use ctx.ExecutionMemory.GetNodeOutput for same-run cross-node data; use ctx.ExecutionMemory.GetPinnedData for cross-run persistence.