Skip to main content

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.
Persisted data implementation

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 empy 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

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
This is the value that will be stored
Example Value

Cross Flow - Append Value To List

Append a value to the list with the specified key, creating the list as needed | key: appendCrossFlowValueToList

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
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

InputDefaultNotesExample
Amount
data
amountInput
1
This is the amount that will be used for incrementing/decrementing
1
Key
data
/ Required
keyInput
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

InputNotesExample
Default Value
data
defaultValueInput
This is the value that will be returned if there is no value present
Example Default Value
Key
data
/ Required
keyInput
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

InputDefaultNotesExample
Amount
data
amountInput
1
This is the amount that will be used for incrementing/decrementing
1
Key
data
/ Required
keyInput
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

InputNotesExample
Dynamic Keys
string
Value List
dynamicKeys
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
data
keyInput
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

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
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

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
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

InputNotesExample
Key
data
/ Required
keyInput
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

InputNotesExample
Dynamic Values
string
Key Value List
dynamicValues
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
data
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
valueInput
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

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
This is the value that will be stored
Example Value

Execution - Append Value To List

Append a value to the list with the specified key, creating the list as needed | key: appendExecutionValueToList

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
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

InputDefaultNotesExample
Amount
data
amountInput
1
This is the amount that will be used for incrementing/decrementing
1
Key
data
/ Required
keyInput
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

InputNotesExample
Default Value
data
defaultValueInput
This is the value that will be returned if there is no value present
Example Default Value
Key
data
/ Required
keyInput
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

InputDefaultNotesExample
Amount
data
amountInput
1
This is the amount that will be used for incrementing/decrementing
1
Key
data
/ Required
keyInput
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

InputNotesExample
Dynamic Keys
string
Value List
dynamicKeys
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
data
keyInput
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

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
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

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
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

InputNotesExample
Key
data
/ Required
keyInput
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

InputNotesExample
Dynamic Values
string
Key Value List
dynamicValues
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
data
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
valueInput
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

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
This is the value that will be stored
Example Value

Flow - Append Value To List

Append a value to the list with the specified key, creating the list as needed | key: appendInstanceValueToList

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
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

InputDefaultNotesExample
Amount
data
amountInput
1
This is the amount that will be used for incrementing/decrementing
1
Key
data
/ Required
keyInput
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

InputNotesExample
Default Value
data
defaultValueInput
This is the value that will be returned if there is no value present
Example Default Value
Key
data
/ Required
keyInput
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

InputDefaultNotesExample
Amount
data
amountInput
1
This is the amount that will be used for incrementing/decrementing
1
Key
data
/ Required
keyInput
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

InputNotesExample
Dynamic Keys
string
Value List
dynamicKeys
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
data
keyInput
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

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
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

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
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

InputNotesExample
Key
data
/ Required
keyInput
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

InputNotesExample
Dynamic Values
string
Key Value List
dynamicValues
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
data
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
valueInput
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

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
This is the value that will be stored
Example Value

Integration - Append Value To List

Append a value to the list with the specified key, creating the list as needed | key: appendIntegrationValueToList

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
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

InputDefaultNotesExample
Amount
data
amountInput
1
This is the amount that will be used for incrementing/decrementing
1
Key
data
/ Required
keyInput
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

InputNotesExample
Default Value
data
defaultValueInput
This is the value that will be returned if there is no value present
Example Default Value
Key
data
/ Required
keyInput
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

InputDefaultNotesExample
Amount
data
amountInput
1
This is the amount that will be used for incrementing/decrementing
1
Key
data
/ Required
keyInput
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

InputNotesExample
Dynamic Keys
string
Value List
dynamicKeys
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
data
keyInput
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

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
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

InputNotesExample
Key
data
/ Required
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
/ Required
valueInput
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

InputNotesExample
Key
data
/ Required
keyInput
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

InputNotesExample
Dynamic Values
string
Key Value List
dynamicValues
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
data
keyInput
This is the key that will be used to refer to the stored value
Example Key
Value
data
valueInput
This is the value that will be stored
Example Value