Workflow persistence
Workflow persistence is require to maintain workflow state between runs.
By default, persistence files will be created in the agent working directory, however a path can be defined when declaring persistence on a workflow step, or preferably by setting the bootstrap persistenceRoot
`
The main consideration is to ensure that the directory used for persistence exists and is writable by the agent.
Persistence files must be available to the agent after a restart or redeployment in order for the workflows to resume from the last state.
Persistence usage
To persist a value use context.setPersistedItem(String key, String value)
- note that you set the value as a string.
To get a value from persistence use context.getPersistedItem(String key) - note that the value is returned as a string.