If there is a transformation defined or referenced, then this transformation Expression will be evaluated and the result of the evaluation is copied into the target. There can be zero (0) to many sources defined in this case, but there is no requirement that these sources are used inside the Expression.

In any case, sources are used to define if the data association can be “executed,” if any of the sources is in the state of “unavailable,” then the data association cannot be executed, and the Activity or Event where the data association is defined MUST wait until this condition is met.

Data Associations are always contained within another element that defines when these data associations are going to be executed. Activities define two sets of data associations, while Events define only one.

For Events, there is only one set, but they are used differently for catch or throw Events. For a catch Event, data associations are used to push data from the Message received into Data Objects and properties. For a throw Event, data associations are used to fill the Message that is being thrown.

As DataAssociations are used in different stages of the Process and Activity lifecycle, the possible sources and targets vary according to that stage. This defines the scope of possible elements that can be referenced as source and target. For example: when an Activity starts executing, the scope of valid targets include the Activity data inputs, while at the end of the Activity execution, the scope of valid sources include Activity data outputs.

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

Table 10.63 – DataAssociation model associations

Attribute Name

Description/Usage

 

 

transformation: Expression [0..1]

Specifies an optional transformation Expression. The actual scope of

 

accessible data for that Expression is defined by the source and target of

 

the specific Data Association types.

assignment: Assignment [0..*]

Specifies one or more data elements Assignments. By using an

 

Assignment, single data structure elements can be assigned from the

 

source structure to the target structure.

 

 

sourceRef: ItemAwareElement

Identifies the source of the Data Association. The source MUST be an

[0..*]

ItemAwareElement.

 

targetRef: ItemAwareElement

Identifies the target of the Data Association. The target MUST be an

 

ItemAwareElement.

Assignment

The Assignment class is used to specify a simple mapping of data elements using a specified Expression language.

The default Expression language for all Expressions is specified in the Definitions element, using the expressionLanguage attribute. It can also be overridden on each individual Assignment using the same attribute.

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

222

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

Table 10.64 – Assignment attributes

Attribute Name

Description/Usage

 

 

from: Expression

The Expression that evaluates the source of the Assignment.

 

to: Expression

The Expression that defines the actual Assignment operation and the target

 

data element.

 

 

DataInputAssociation

The DataInputAssociation can be used to associate an ItemAwareElement element with a DataInput contained in an Activity. The source of such a DataAssociation can be every ItemAwareElement accessible in the current scope, e.g., a Data Object, a Property, or an Expression.

The DataInputAssociation element inherits the attributes and model associations of DataAssociation (see Table 10.64), but does not contain any additional attributes or model associations.

DataOutputAssociation

The DataOutputAssociation can be used to associate a DataOutput contained within an ACTIVITY with any ItemAwareElement accessible in the scope the association will be executed in. The target of such a DataAssociation can be every ItemAwareElement accessible in the current scope, e.g., a Data Object, a

Property, or an Expression.

The DataOutputAssociation element inherits the attributes and model associations of DataAssociation (see Table 10.64), but does not contain any additional attributes or model associations.

Data Objects associated with a Sequence Flow

Figure 10.67 repeats Figure 10.66, above, and shows how Data Associations are used to represent inputs and outputs of Activities.

Research

Notes

Research

Write Text

the Topic

 

Figure 10.67 – A Data Object shown as an output and an inputs

Alternatively, Data Objects MAY be directly associated with a Sequence Flow connector (see Figure 10.68) to represent the same input/output relationships. This is a visual short cut that normalizes two Data Associations (e.g., as seen in Figure 10.67): one from an item-aware element (e.g., an Activity) contained by the source of the Sequence Flow, connecting to the Data Object; and the other from the Data Object connecting to a item-aware element contained by the target of the Sequence Flow.

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

223