this
.
For example, you can define a data store as a dataStore prop, and reference it at this.dataStore
:
props
injects variables into this
. See how we declared the dataStore
prop in the props
object, and then accessed it at this.dataStore
in the run
method.await
ed.this.dataStore.set
method. The first argument is the key where the data should be held, and the second argument is the value assigned to that key.
set
method. The TTL value is specified in seconds:
setTtl
method:
keys
method:
key
exists in a Data Store, you can pass the key
to the has
method to get back a true
or false
:
get
method. Pass the key to the get
method to retrieve the content that was stored there with set
.
set
method for an existing key
and pass either the new value or ''
as the second argument to remove the value but retain the key.
delete
method for a specific key
:
clear
method. Note that this is an irreversible change, even when testing code in the workflow builder.
props
definition. Let’s define 2 separate customers
and orders
data sources and leverage them in a single code step: