Persist Data Component
Persist small amounts of data that will be available later in the execution or in subsequent executions of the Instance
Component key: persist-data
Description
The persist data component provides functionality to persist small amounts of data for use during an integration execution or in subsequent integration executions. This is helpful if you want to save a bit of data during an integration invocation for use in a later step, or in a subsequent execution.
For details on how to persist data between flow invocations, see the building integrations article.
Data can be persisted in three ways:
- For just the duration of the execution.
Data persists ephemerally for only as long as a flow runs.
You might use the
Execution -actions, for example, as an accumulator in a loop. - Between executions of a specific flow.
Data persists between instance executions and is scoped for a specific flow.
One flow cannot access another flow's data.
The
Flow -actions are handy for saving data from one flow's run, and referencing it in a subsequent run of that same flow. - Globally, for all flows in an instance.
Data persists between instance executions and is scoped for the entire instance.
The
Cross Flow -actions let flows within an instance reference one another's persisted data.
When an execution starts, it loads persisted data from storage. When the execution finishes, it writes out its state to storage if any state was changed.
Note that if two executions run at the same time, the execution that finishes last will overwrite any state that the first execution wrote.
Viewing Persisted Data Usage
The Get Persist Data Usage Metrics action will yield the size of flow, cross-flow and integration-scoped persisted data in bytes.
Empty persisted data will yield a size of 2 bytes, which represents an empty object {}.
The maximum amount of data you can persist is 64 MB (or 67108864 bytes).
Actions
Cross Flow - Add Value To Set
Add a value to the set with the specified key, creating the set as needed | key: addCrossFlowValueToSet
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be stored | Example Value |
Cross Flow - Append Multiple Values To a List
Append multiple values to the list with the specified key, creating the list as needed | key: appendCrossFlowValuesToList
| Input | Notes | Example |
|---|---|---|
| Dynamic Values | Use this input if you need to provide multiple values in a JSON format. This input will be favored over the Values input. | |
| Flatten Values | If this is enabled the values of the multiple values input or the dynamic values input will be flattened. | false |
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Values | Use this input if you need to provide multiple values to the same key. | value1, value2 |
Cross Flow - Append Value To List
Append a value to the list with the specified key, creating the list as needed | key: appendCrossFlowValueToList
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be stored | Example Value |
Cross Flow - Clear All State
Delete all cross-flow state stored for this instance | key: removeCrossFlowState
Cross Flow - Decrement Value
Decrement the stored integer value with the specified key by the specified amount | key: decrementCrossFlowValue
| Input | Notes | Example |
|---|---|---|
| Amount | This is the amount that will be used for incrementing/decrementing | 1 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
Cross Flow - Get Value
Get the value with the specified key, returning the specified default value if key not present | key: getCrossFlowValue
| Input | Notes | Example |
|---|---|---|
| Default Value | This is the value that will be returned if there is no value present | Example Default Value |
| Key | This is the key that will be used to refer to the stored value | Example Key |
{
"data": "Example Saved Value"
}
Cross Flow - Increment Value
Increment the stored integer value with the specified key by the specified amount | key: incrementCrossFlowValue
| Input | Notes | Example |
|---|---|---|
| Amount | This is the amount that will be used for incrementing/decrementing | 1 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
Cross Flow - List Keys
List all keys persisted at the cross-flow level | key: listCrossFlowKeys
Cross Flow - Remove Value
Remove the value with the specified key | key: removeCrossFlowValue
| Input | Notes | Example |
|---|---|---|
| Multiple Keys | Use this input if you need to provide multiple keys. Please take note that this action favors this input instead of the regular key input, which it ignores. | key1, key2 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
Cross Flow - Remove Value From List
Remove the value from the list with the specified key | key: removeCrossFlowValueFromList
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be removed | Example Value |
Cross Flow - Remove Value From Set
Remove the value from the set with the specified key | key: removeCrossFlowValueFromSet
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be removed | Example Value |
Cross Flow - Save Current Time
Save the current time in UTC using the specified key | key: saveCrossFlowCurrentTime
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
Cross Flow - Save Value
Save a value with the specified key for use at a later time | key: saveCrossFlowValue
| Input | Notes | Example |
|---|---|---|
| Key/Values | Use this input if you need to provide multiple keys and values. Please take note that this action favors this input instead of the regular key/value inputs, which it ignores. | key1: value1, key2: value2 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be stored | Example Value |
Execution - Add Value To Set
Add a value to the set with the specified key, creating the set as needed | key: addExecutionValueToSet
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be stored | Example Value |
Execution - Append Multiple Values To a List
Append multiple values to the list with the specified key, creating the list as needed | key: appendExecutionValuesToList
| Input | Notes | Example |
|---|---|---|
| Dynamic Values | Use this input if you need to provide multiple values in a JSON format. This input will be favored over the Values input. | |
| Flatten Values | If this is enabled the values of the multiple values input or the dynamic values input will be flattened. | false |
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Values | Use this input if you need to provide multiple values to the same key. | value1, value2 |
Execution - Append Value To List
Append a value to the list with the specified key, creating the list as needed | key: appendExecutionValueToList
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be stored | Example Value |
Execution - Clear All State
Delete all execution state | key: removeExecutionState
Execution - Decrement Value
Decrement the stored integer value with the specified key by the specified amount | key: decrementExecutionValue
| Input | Notes | Example |
|---|---|---|
| Amount | This is the amount that will be used for incrementing/decrementing | 1 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
Execution - Get Value
Get the value with the specified key, returning the specified default value if key not present | key: getExecutionValue
| Input | Notes | Example |
|---|---|---|
| Default Value | This is the value that will be returned if there is no value present | Example Default Value |
| Key | This is the key that will be used to refer to the stored value | Example Key |
{
"data": "Example Saved Value"
}
Execution - Increment Value
Increment the stored integer value with the specified key by the specified amount | key: incrementExecutionValue
| Input | Notes | Example |
|---|---|---|
| Amount | This is the amount that will be used for incrementing/decrementing | 1 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
Execution - List Keys
List all keys persisted at the execution level | key: listExecutionKeys
Execution - Remove Value
Remove the value with the specified key | key: removeExecutionValue
| Input | Notes | Example |
|---|---|---|
| Multiple Keys | Use this input if you need to provide multiple keys. Please take note that this action favors this input instead of the regular key input, which it ignores. | key1, key2 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
Execution - Remove Value From List
Remove the value from the list with the specified key | key: removeExecutionValueFromList
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be removed | Example Value |
Execution - Remove Value From Set
Remove the value from the set with the specified key | key: removeExecutionValueFromSet
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be removed | Example Value |
Execution - Save Current Time
Save the current time in UTC using the specified key | key: saveExecutionCurrentTime
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
Execution - Save Value
Save a value with the specified key for use at a later time | key: saveExecutionValue
| Input | Notes | Example |
|---|---|---|
| Key/Values | Use this input if you need to provide multiple keys and values. Please take note that this action favors this input instead of the regular key/value inputs, which it ignores. | key1: value1, key2: value2 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be stored | Example Value |
Flow - Add Value To Set
Add a value to the set with the specified key, creating the set as needed | key: addInstanceValueToSet
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be stored | Example Value |
Flow - Append Multiple Values To a List
Append multiple values to the list with the specified key, creating the list as needed | key: appendInstanceValuesToList
| Input | Notes | Example |
|---|---|---|
| Dynamic Values | Use this input if you need to provide multiple values in a JSON format. This input will be favored over the Values input. | |
| Flatten Values | If this is enabled the values of the multiple values input or the dynamic values input will be flattened. | false |
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Values | Use this input if you need to provide multiple values to the same key. | value1, value2 |
Flow - Append Value To List
Append a value to the list with the specified key, creating the list as needed | key: appendInstanceValueToList
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be stored | Example Value |
Flow - Clear All State
Delete all flow state stored for this instance | key: removeInstanceState
Flow - Decrement Value
Decrement the stored integer value with the specified key by the specified amount | key: decrementInstanceValue
| Input | Notes | Example |
|---|---|---|
| Amount | This is the amount that will be used for incrementing/decrementing | 1 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
Flow - Get Value
Get the value with the specified key, returning the specified default value if key not present | key: getInstanceValue
| Input | Notes | Example |
|---|---|---|
| Default Value | This is the value that will be returned if there is no value present | Example Default Value |
| Key | This is the key that will be used to refer to the stored value | Example Key |
{
"data": "Example Saved Value"
}
Flow - Increment Value
Increment the stored integer value with the specified key by the specified amount | key: incrementInstanceValue
| Input | Notes | Example |
|---|---|---|
| Amount | This is the amount that will be used for incrementing/decrementing | 1 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
Flow - List Keys
List all keys persisted at the flow level | key: listInstanceKeys
Flow - Remove Value
Remove the value with the specified key | key: removeInstanceValue
| Input | Notes | Example |
|---|---|---|
| Multiple Keys | Use this input if you need to provide multiple keys. Please take note that this action favors this input instead of the regular key input, which it ignores. | key1, key2 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
Flow - Remove Value From List
Remove the value from the list with the specified key | key: removeInstanceValueFromList
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be removed | Example Value |
Flow - Remove Value From Set
Remove the value from the set with the specified key | key: removeInstanceValueFromSet
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be removed | Example Value |
Flow - Save Current Time
Save the current time in UTC using the specified key | key: saveInstanceCurrentTime
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
Flow - Save Value
Save a value with the specified key for use at a later time | key: saveInstanceValue
| Input | Notes | Example |
|---|---|---|
| Key/Values | Use this input if you need to provide multiple keys and values. Please take note that this action favors this input instead of the regular key/value inputs, which it ignores. | key1: value1, key2: value2 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be stored | Example Value |
Get Persist Data Usage Metrics
Get usage metrics for persisted data. Persisted data can total 64 MB. | key: getUsage
{
"data": {
"flowStateBytes": 100,
"crossFlowStateBytes": 2,
"integrationFlowStateBytes": 50,
"totalBytes": 152,
"maxAllowedBytes": 67108864
}
}
Integration - Add Value To Set
Add a value to the set with the specified key, creating the set as needed | key: addIntegrationValueToSet
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be stored | Example Value |
Integration - Append Multiple Values To a List
Append multiple values to the list with the specified key, creating the list as needed | key: appendIntegrationValuesToList
| Input | Notes | Example |
|---|---|---|
| Dynamic Values | Use this input if you need to provide multiple values in a JSON format. This input will be favored over the Values input. | |
| Flatten Values | If this is enabled the values of the multiple values input or the dynamic values input will be flattened. | false |
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Values | Use this input if you need to provide multiple values to the same key. | value1, value2 |
Integration - Append Value To List
Append a value to the list with the specified key, creating the list as needed | key: appendIntegrationValueToList
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be stored | Example Value |
Integration - Clear All State
Delete all integration state stored for all instances of this integration | key: removeIntegrationState
Integration - Decrement Value
Decrement the stored integer value with the specified key by the specified amount | key: decrementIntegrationValue
| Input | Notes | Example |
|---|---|---|
| Amount | This is the amount that will be used for incrementing/decrementing | 1 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
Integration - Get Value
Get the value with the specified key, returning the specified default value if key not present | key: getIntegrationValue
| Input | Notes | Example |
|---|---|---|
| Default Value | This is the value that will be returned if there is no value present | Example Default Value |
| Key | This is the key that will be used to refer to the stored value | Example Key |
{
"data": "Example Saved Value"
}
Integration - Increment Value
Increment the stored integer value with the specified key by the specified amount | key: incrementIntegrationValue
| Input | Notes | Example |
|---|---|---|
| Amount | This is the amount that will be used for incrementing/decrementing | 1 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
Integration - List Keys
List all keys persisted at the integration level | key: listIntegrationKeys
Integration - Remove Value
Remove the value with the specified key | key: removeIntegrationValue
| Input | Notes | Example |
|---|---|---|
| Multiple Keys | Use this input if you need to provide multiple keys. Please take note that this action favors this input instead of the regular key input, which it ignores. | key1, key2 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
Integration - Remove Value From List
Remove the value from the list with the specified key | key: removeIntegrationValueFromList
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be removed | Example Value |
Integration - Remove Value From Set
Remove the value from the set with the specified key | key: removeIntegrationValueFromSet
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be removed | Example Value |
Integration - Save Current Time
Save the current time in UTC using the specified key | key: saveIntegrationCurrentTime
| Input | Notes | Example |
|---|---|---|
| Key | This is the key that will be used to refer to the stored value | Example Key |
Integration - Save Value
Save a value with the specified key for use at a later time | key: saveIntegrationValue
| Input | Notes | Example |
|---|---|---|
| Key/Values | Use this input if you need to provide multiple keys and values. Please take note that this action favors this input instead of the regular key/value inputs, which it ignores. | key1: value1, key2: value2 |
| Key | This is the key that will be used to refer to the stored value | Example Key |
| Value | This is the value that will be stored | Example Value |