Data
In Workflow Modeler we distinguish process data from task data. In executable models, process variables are visualized by shapes in the diagram. Task data is not visualized in the diagram, but instead defined by the task logic or data mapping from process variables to and from the task.
In Workflow Modeler, both process data and task data are defined as FEEL datatypes, and the mapping between them uses FEEL expressions. This allows fully executable process services to be defined without programming.
Process Variables
Four shapes representing process variables are available in the Workflow Modeler: data object, data input, data output, and datastore. The scope of all process variables is a process, meaning they are visible at all process levels.
Data Object
In the figure above, Request variables and Calculated data are data objects. A data object is not a process input or an output but instead is instantiated and calculated within the process logic. Like a variable in a software program, it is transient storage of a value. When the process instance is no longer running, the data object has no value. The value of a data object is passed to task inputs and events by data input mapping, and receives values from task outputs and events by data output mapping.
In the Shapes panel, the data object shape is called Data Object Reference, because each data object with the same name represents the same semantic element, meaning they all have the same data type and the same value. If a first task set the value of a data object, a second task coming later in the process can use another data object reference with the same name and in this case, access the value of the original data object.
Data Input
A data input represents a value received upon execution of the process. When a process is published, an input will be required for each data input of the process.
In the figure above, Process request is now a data input. Its value must be supplied by the client application or process invoking the service.
Data Output
In the figure above, Data outputs and Validation result are data outputs, values returned to the invoking client upon completion of the service.
The Collect End Events names under end output variable options of the process Data Output dialog is on by default and controls if a end variable will be automatically created (as a collection of string) to hold the name of all the end events executed. Unchecking this option will not output the end variable.
Datastore
In the figure above, Data table1 is a datastore. Unlike data object, the value of a datastore is persisted, stored in a database so it is available even when the process instance has completed. In Workflow Modeler, a datastore, also called a cloud datastore, is a FEEL relational data table. Process tasks and events interact with it just like a data object, via data mapping, but external entities also can access the datastore through an API and a management interface. For example, in the diagram above, Data table1 is initially populated via a management utility, and in the process its values are read by the Business rule tasks Validate Process Request and Business Logic, and written by the User task Human Interaction.