Скачиваний:
25
Добавлен:
28.01.2021
Размер:
7.15 Mб
Скачать

Once an InputSet becomes “available,” all Data Associations whose target is any of the Data Inputs of the InputSet are executed. These executions fill the Activity Data Inputs and the execution of the Activity can begin. When an Activity finishes execution, all Data Associations whose sources are any of the Data Outputs of the OutputSet are executed. These executions copy the values from the Data Outputs back to the container’s context (Data Object, Properties, etc.).

Execution Semantics for DataAssociation

The execution of any Data Associations MUST follow these semantics:

If the Data Association specifies a “transformation” Expression, this expression is evaluated and the result is copied to the targetRef. This operation replaces completely the previous value of the targetRef element.

For each “assignment” element specified:

Evaluate the Assignment’s “from” expression and obtain the *source value*.

Evaluate the Assignment’s “to” expression and obtain the *target element*. The *target element* can be any element in the context or a sub-element of it (e.g., a DataObject or a sub-element of it).

Copy the *source value* to the *target element*.

If no “transformation” Expression nor any “assignment” elements are defined in the Data Association:

Copy the Data Association “sourceRef” value into the “targetRef.” Only one sourceRef element is allowed in this case.

10.4.3 Usage of Data in XPath Expressions

BPMN extensibility mechanism enables the usage of various languages for Expressions and queries. This sub clause describes how XPath is used in BPMN. It introduces a mechanism to access BPMN Data Objects, BPMN Properties, and various instance attributes from XPath Expressions. The accessibility by the Expression language is defined based on the entities accessibility by the Activity that contains the Expression. All elements accessible from the enclosing element of an XPath Expression MUST be made available to the XPath processor.

BPMN Data Objects and BPMN Properties are defined using ItemDefinition. The XPath binding assumes that the ItemDefinition is either an XSD complex type or an XSD element. If XSD element is used, it MUST be manifested as a node-set XPath variable with a single member node. If XSD complex type is used, it MUST be manifested as a nodeset XPath variable with one member node containing the anonymous document element that contains the actual value of the BPMN Data Object or Property.

Access to BPMN Data Objects

Table 10.65 introduces an XPath function used to access BPMN Data Objects. Argument processName names Process and is of type string. Argument dataObjectName names Data Object and is of type string. It MUST be a literal string.

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

225

Table 10.65 – XPath Extension Function for Data Objects

XPath Extension Function

Description/Usage

 

 

Element getDataObject

This extension function returns value of submitted Data Object. Argument

(‘processName’, ‘dataObjectName’)

processName is optional. If omitted, the process enclosing the Activity

 

 

that contains the Expression is assumed. In order to access Data

 

Objects defined in a parent process the processName MUST be used.

 

Otherwise it MUST be omitted.

Because XPath 1.0 functions do not support returning faults, an empty node set is returned in the event of an error.

Access to BPMN Data Input and Data Output

Table 10.66 introduces XPath functions used to access BPMN Data Inputs and BPMN Data Outputs. Argument dataInputName names a Data Input and is of type string. Argument dataOutput names a Data Output and is of type string.

Table 10.66 – XPath Extension Function for Data Inputs and Data Outputs

XPath Extension Function

Description/Usage

 

 

Element getDataInput (‘dataInputName’)

This extension function returns the value of the submitted Data

 

Input.

 

 

Element getDataOutput ('dataOutputName')

This extension function returns the value of the submitted Data

 

Output.

 

 

Access to BPMN Properties

Table 10.67 introduces XPath functions used to access BPMN Properties.

Argument processName names Process and is of type string. Argument propertyName names property and is of type string. Argument activityName names Activity and is of type string. Argument eventName names Event and is of type string. These strings MUST be literal strings. The XPath extension functions return value of the submitted property. Because XPath 1.0 functions do not support returning faults, an empty node set is returned in the event of an error.

226

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

Table 10.67 – XPath Extension Functions for Properties

XPath Extension Function

Description/Usage

 

 

Element getProcessProperty

This extension function returns value of submitted Process property.

(‘processName’, ‘propertyName’)

Argument processName is optional. If omitted, the Process enclosing the

 

 

Activity that contains the Expression is assumed. In order to access

 

Properties defined in a parent Process the processName MUST be

 

used. Otherwise it MUST be omitted.

 

 

Element getActivityProperty

This extension function returns value of submitted Activity property.

(‘activityName’, ‘propertyName’)

 

 

 

Element getEventProperty

This extension function returns value of submitted Event property.

‘eventName’, ‘propertyName’)

 

 

 

For BPMN Instance Attributes

Table 10.68 introduces XPath functions used to access BPMN instance Attributes.

Argument processName names Process and is of type string. Argument attributeName names instance attribute and is of type string. Argument activityName names Activity and is of type string. These strings MUST be literal strings.

These functions return value of the submitted instance Activity. Because XPath 1.0 functions do not support returning faults, an empty node set is returned in the event of an error.

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

227