Book Image

OSWorkflow: A guide for Java developers and architects to integrating open-source Business Process Management

Book Image

OSWorkflow: A guide for Java developers and architects to integrating open-source Business Process Management

Overview of this book

OSWorkflow is an open-source workflow engine written entirely in Java with a flexible approach and a technical user-base target. It is released under the Apache License. You can create simple or complex workflows, depending on your needs. You can focus your work on the business logic and rules. No more Petri Net or finite state machine coding! You can integrate OSWorkflow into your application with a minimum of fuss. OSWorkflow provides all of the workflow constructs that you might encounter in real-life processes, such as steps, conditions, loops, splits, joins, roles, etc.This book explains in detail all the various aspects of OSWorkflow, without assuming any prior knowledge of Business Process Management. Real-life examples are used to clarify concepts.
Table of Contents (13 chapters)
OSWorkflow
Credits
About the Author
About the Reviewers
Introduction

How to Deal with Transient Data


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...