Table 10.50 – Transaction XML schema

<xsd:element name="transaction" type="tTransaction" substitutionGroup="flowElement"/> <xsd:complexType name="tTransaction">

<xsd:complexContent>

<xsd:extension base="tSubProcess">

<xsd:attribute name="method" type="tTransactionMethod" default="Compensate"/> </xsd:extension>

</xsd:complexContent>

</xsd:complexType>

<xsd:simpleType name="tTransactionMethod"> <xsd:restriction base="xsd:string">

<xsd:enumeration value="Compensate"/> <xsd:enumeration value="Image"/> <xsd:enumeration value="Store"/>

</xsd:restriction>

</xsd:simpleType>

10.4 Items and Data

A traditional requirement of Process modeling is to be able to model the items (physical or information items) that are created, manipulated, and used during the execution of a Process. An important aspect of this is the ability to capture the structure of that data and to query or manipulate that structure.

BPMN does not itself provide a built-in model for describing structure of data or an Expression language for querying that data. Instead it formalizes hooks that allow for externally defined data structures and Expression languages. In addition, BPMN allows for the co-existence of multiple data structure and Expression languages within the same model. The compatibility and verification of these languages is outside the scope of this International Standard and becomes the responsibility of the tool vendor.

BPMN designates XML Schema and XPath as its default data structure and Expression languages respectively, but vendors are free to substitute their own languages.

10.4.1 Data Modeling

A traditional requirement of Process modeling is to be able to model the items (physical or information items) that are created, manipulated, and used during the execution of a Process.

This requirement is realized in BPMN through various constructs: Data Objects, ItemDefinition, Properties, Data Inputs, Data Outputs, Messages, Input Sets, Output Sets, and Data Associations.

Item-Aware Elements

Several elements in BPMN are subject to store or convey items during process execution. These elements are referenced generally as “item-aware elements.” This is similar to the variable construct common to many languages. As with variables, these elements have an ItemDefinition.

202

Business Process Model and Notation (BPMN), v2.0.2

The data structure these elements hold is specified using an associated ItemDefinition. An ItemAwareElement MAY be underspecified, meaning that the structure attribute of its ItemDefinition is optional if the modeler does not wish to define the structure of the associated data.

The elements in the specification defined as item-aware elements are: Data Objects, Data Object References, Data Stores, Properties, DataInputs and DataOutputs.

Figure 10.50 – ItemAware class diagram

The ItemAwareElement element inherits the attributes and model associations of BaseElement (see Table 8.5). Table 10.51 presents the additional model associations of the ItemAwareElement element.

Table 10.51 – ItemAwareElement model associations

Attribute Name

Description/Usage

 

 

itemSubjectRef: ItemDefinition [0..1]

Specification of the items that are stored or conveyed by the

 

ItemAwareElement.

dataState: DataState [0..1]

A reference to the DataState, which defines certain states for the data

 

 

contained in the Item.

 

 

Business Process Model and Notation (BPMN), v2.0.2

203

Data Objects

The primary construct for modeling data within the Process flow is the DataObject element. A DataObject has a well-defined lifecycle, with resulting access constraints.

DataObject

The Data Object class is an item-aware element. Data Object elements MUST be contained within Process or SubProcess elements. Data Object elements are visually displayed on a Process diagram. Data Object References are a way to reuse Data Objects in the same diagram. They can specify different states of the same Data Object at different points in a Process. Data Object Reference cannot specify item definitions, and Data Objects cannot specify states. The names of Data Object References are derived by concatenating the name of the referenced Data Data Object the state of the Data Object Reference in square brackets as follows: <Data Object Name> [ <Data Object Reference State> ].

Figure 10.51 – DataObject class diagram

The DataObject element inherits the attributes and model associations of FlowElement (see Table 8.44) and ItemAwareElement (Table 10.52). Table 10.54 presents the additional attributes of the DataObject element.

204

Business Process Model and Notation (BPMN), v2.0.2

Table 10.52 – DataObject attributes

Attribute Name

Description/Usage

 

 

isCollection: boolean = false

Defines if the Data Object represents a collection of elements. It is needed

 

when no itemDefinition is referenced. If an itemDefinition is

 

referenced, then this attribute MUST have the same value as the

 

isCollection attribute of the referenced itemDefinition. The default

 

value for this attribute is false.

 

 

The Data Object Reference element inherits the attributes and model associations of ItemAwareElement (Table 10.52) and FlowElement (see Table 8.44). Table 10.53 presents the additional attributes of the Data Object Reference element.

Table 10.53 – DataObjectReference attributes and model associations

Attribute Name

Description/Usage

 

 

dataObjectRef: DataObject

The Data Object referenced by the Data Object Reference.

 

 

States

Data Object elements can optionally reference a DataState element, which is the state of the data contained in the Data Object (see an example of DataStates used for Data Objects in Figure 7.8). The definition of these states, e.g., possible values and any specific semantic are out of scope of this International Standard. Therefore, BPMN adopters can use the State element and the BPMN extensibility capabilities to define their states.

The DataState element inherits the attributes and model associations of BaseElement (see Table 8.5). Table 10.54 presents the additional attributes and model associations of the DataObject element.

Table 10.54 – DataState attributes and model associations

Attribute Name

Description/Usage

 

 

name: string

Defines the name of the DataState.

 

Data Objects representing a Collection of Data

A DataObject element that references an ItemDefinition marked as collection has to be visualized differently, compared to single instance data structures. The notation looks as follows:

Single instance (see Figure 10.52 )

Business Process Model and Notation (BPMN), v2.0.2

205