Not every bit of data is created to be persisted; for these cases OSWorkflow provides a transient variables map. This map is created for every invocation to the Workflow
instance and is used to store temporary data in one place during the workflow processing. Its content is cleared in each invocation and is pre-populated with the current workflow instance, store, and descriptor objects inside it. The input data from the outside is present in this map.
The transient variables map is made available for scripting to the FunctionProviders
and Condition
interfaces. In the BeanShell scripting context, the map variable is called transientVars
.
For example, the following code snippet prints the content of a variable from the transient variable map:
<function type="beanshell"> <arg name="script"> System.out.println(transientVars.get("foo")) </arg> </function>
Also, the following special variables are available in the transientVars
map:
Map Key... |
---|