
set
Set a state in the state store (Deprecated, use KV store instead).
Set a state in the state store (Deprecated, use KV store instead).
Set a state in the state store (Deprecated, use KV store instead).
Values will be merged:
- If you provide a new key, the new key will be added.
- If you provide an existing key, the previous key will be overwrite.
: : alert{type="warning"} This method is not concurrency safe. If many executions for the same flow are concurrent, there is no guarantee on isolation on the value. The value can be overwritten by other executions. : :
type: "io.kestra.plugin.core.state.set"Examples
Set the default state for the current flow.
id: set_state
type: io.kestra.plugin.core.state.Set
data:
'{{ inputs.store }}': '{{ outputs.download.md5 }}'Set the myState state for the current flow.
id: set_state
type: io.kestra.plugin.core.state.Set
name: myState
data:
'{{ inputs.store }}': '{{ outputs.download.md5 }}'Properties
dataobject
The data to be stored in the state store
namestring
defaultThe name of the state file
namespacebooleanstring
falseShare state for the current namespace.
By default, the state is isolated by namespace and flow, setting to true will share the state between the same namespace
taskrunValuebooleanstring
trueIsolate the state with taskrun.value.
By default, the state will be isolated with taskrun.value (during iteration with each). Setting to false will use the same state for every run of the iteration.
Outputs
countinteger
0The count of properties found in the state
keystring
The key of the current state