Tasks
Org Global Value
Performs an operation on, or creates, a key–value pair that is accessible to all stubs.
Uses
- Store values that must be shared across all templates.
- Keep temporary data that needs to persist across multiple stubs.
Basic usage
Parameters
key required string
The key on which the operation will be executed. It must consist of at least five components, separated by :.
operation string
The operation to perform on the key.
Options:
set Sets the key to the value provided in
savevalue.get Retrieves the current value of the key.
delete Removes the key entirely.
increment Increments the numeric value of the key.
decrement Decrements the numeric value of the key.
savevalue
The value to set when the operation is set.
expiry_date
A specific date on which the key’s value will expire.
expire_in number
The number of seconds after which the key’s value will expire.
Result
Properties
key string
The key on which the operation was executed.
value
The resulting value of the key after the operation.
Examples
Set value with expiry date
Set a global org value with a specific expiry date.
Get value and save to stub data
Retrieve a global org value.
To store the value inside stub.data, use a savedata task.
Save the result from the previous task: