Flow Studio
Execution Memory
ExecutionMemory is the in-process data store that carries all node outputs through a single workflow execution. It is created at execution start, lives for the lifetime of the run, and is destroyed (or serialized to the database for HIL suspension) when the execution ends. Every node executor accesses it via ctx.ExecutionMemory.
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.
| Concept | Detail |
|---|---|
| Scope | One instance per execution run. Multiple concurrent executions of the same workflow have completely independent ExecutionMemory instances. |
| Lifetime | Created when the execution starts; destroyed when the execution completes or fails. For HIL suspensions, serialized and stored in the database. |
| Storage | In-memory (not a database table). Fast, no I/O cost for reads. |
| Access | Via ctx.ExecutionMemory inside any executor — read-write access. |
| Relationship to pinned data | Completely separate. ExecutionMemory is ephemeral; pinned data is durable. |
Three Storage Areas
| Area | Key | Purpose |
|---|---|---|
nodeOutputs | nodeId (string) | Output from each node execution — the primary data bus between nodes |
globalVariables | variable name (string) | Shared state any node can read or write within the execution |
executionMetadata | key (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
| Page | What You Will Learn |
|---|---|
| Memory Structure | The complete ExecutionMemory class layout and the three storage dictionaries |
| nodeOutputs Map | How node output is keyed, stored, and typed |
| Reading Upstream Output | GetNodeOutput<T> and GetPreviousNodeOutput<T> usage |
| Global Variables | SetGlobal and GetGlobal for cross-node shared state |
| Memory Lifetime | When memory is created, when it is destroyed, and what happens on failure |
| HIL Serialization | How ExecutionMemory is serialized to JSON for HIL suspension and restored on resume |
| Memory Isolation | Tenant 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.