Appearance
Set Shared Memory
Overview
Set Shared memory node writes to value stored in global memory under specified key. Different nodes can read (using Get Shared Memory) and write to the same value in memory that is shared by having same key.
The Set Shared Memory node writes values to a global key-value store. It enables data persistence across multiple flow executions and sharing information with other nodes using a specific memory key.
Use Set Shared Memory when:
- You need to store values between consecutive detection iterations
- You need to share node state between multiple nodes in same or different Flows.
💡 Tip
Ensure that all nodes that need to access same shared memory use same unique key, and no other nodes use it to prevent data collisions.
Inputs
| Name | Type | Description |
|---|---|---|
| input | dynamic | The value to store in shared memory. |
Parameters
| Parameter | Default | Valid values | Tunable |
|---|---|---|---|
| Value type | string | string, number, boolean | ❌ |
| Memory key | "" | string | ❌ |
| Enable automatic state reset | false | boolean | ❌ |
Value type
The data type of the stored value.
Memory key
A key or identifier that determines which value in memory to use. Ensure that all nodes sharing data have same key and that key is unique and not reused by different node groups.
Enable automatic state reset
Resets the node state when the flow state resets, cleaning up previously stored results that were only temporary.
Example
Multi-flow coordination
A setup process in one flow saves product type value to shared memory. Another flow retrieves this value using the Get Shared Memory node to determine which logic is run based on stored product type.
Configuration:
- Value type:
number - Memory key:
product_type
Result: Get Shared Memory outputs the current numeric (as set in Value Type) value stored under the specified key, allowing other Set Shared Memory Nodes to set the shared configuration.
Related links
Reference:
- Get Shared Memory — reads a value from shared memory storage