Table 8.33 – CorrelationPropertyRetrievalExpression model associations

Attribute Name

Description/Usage

 

 

messagePath: FormalExpression

The FormalExpression that defines how to extract a

 

CorrelationProperty from the Message payload.

messageRef: Message

The specific Message the FormalExpression extracts the

 

CorrelationProperty from.

Context-based Correlation

Context-based correlation is a more expressive form of correlation on top of key-based correlation. In addition to implicitly populating the CorrelationKey instance from the first sent or received Message, another mechanism relates the CorrelationKey to the Process context. That is, a Process MAY provide a CorrelationSubscription that acts as the Process-specific counterpart to a specific CorrelationKey. In this way, a Conversation MAY additionally refer to explicitly updateable Process context data to determine whether or not a Message needs to be received. At runtime, the CorrelationKey instance holds a composite key that is dynamically calculated from the Process context and automatically updated whenever the underlying Data Objects or

Properties change.

CorrelationPropertyBindings represent the partial keys of a CorrelationSubscription where each relates to a specific CorrelationProperty in the associated CorrelationKey. A FormalExpression defines how that CorrelationProperty instance is populated and updated at runtime from the Process context (i.e., its

Data Objects and Properties).

The CorrelationSubscription element inherits the attributes and model associations of BaseElement (see Table 8.5). Table 8.34 displays the additional model associations of the CorrelationSubscription element.

Table 8.34 – CorrelationSubscription model associations

Attribute Name

Description/Usage

 

 

correlationKeyRef: CorrelationKey

The CorrelationKey this CorrelationSubscription refers

 

to.

 

 

correlationPropertyBinding:

The bindings to specific CorrelationProperties and

CorrelationPropertyBinding [0..*]

FormalExpressions (extraction rules atop the Process context).

The CorrelationPropertyBinding element inherits the attributes and model associations of BaseElement (see Table 8.5). Table 8.35 displays the additional model associations of the CorrelationPropertyBinding element.

76

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

Table 8.35 – CorrelationPropertyBinding model associations

Attribute Name

Description/Usage

 

 

dataPath: FormalExpression

The FormalExpression that defines the extraction rule atop the Process

 

context.

 

 

correlationPropertyRef:

The specific CorrelationProperty, this

CorrelationProperty

CorrelationPropertyBinding refers to.

At runtime, the correlation mechanism works as follows: When a Process instance is created the CorrelationKey instances of all Conversations are initialized with some initial values that specify to correlate any incoming Message for these Conversations. A SubscriptionProperty is updated whenever any of the Data Objects or Properties changes that are referenced from the respective FormalExpression. As a result, incoming Messages are matched against the now populated CorrelationKey instance. Later in the Process run, the SubscriptionProperties can again change and implicitly change the correlation criterion. Alternatively, the established mechanism of having the first Send Task or Receive Task populate the CorrelationKey instance applies.

XML Schema for Correlation

Table 8.36 – Correlation Key XML schema

<xsd:element name="correlationKey" type="tCorrelationKey"/> <xsd:complexType name="tCorrelationKey">

<xsd:complexContent>

<xsd:extension base="tBaseElement"> <xsd:sequence>

<xsd:element name="correlationPropertyRef" type="xsd:QName" minOccurs="0" maxOccurs="unbounded"/>

</xsd:sequence>

<xsd:attribute name="name" type="xsd:String" use="optional"/> </xsd:extension>

</xsd:complexContent> </xsd:complexType>

Table 8.37 – Correlation Property XML schema

<xsd:element name="correlationProperty" type="tCorrelationProperty" substitutionGroup="rootElement"/> <xsd:complexType name="tCorrelationProperty">

<xsd:complexContent>

<xsd:extension base="tRootElement"> <xsd:sequence>

<xsd:element ref="correlationPropertyRetrievalExpression" minOccurs="1" maxOccurs="unbounded"/>

</xsd:sequence>

<xsd:attribute name="name" type="xsd:String" use="optional"/> <xsd:attribute name="type" type="xsd:QName"/>

</xsd:extension>

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

77

</xsd:complexContent> </xsd:complexType>

Table 8.38 – Correlation Property Binding XML schema

<xsd:element name="correlationPropertyBinding" type="tCorrelationPropertyBinding"/> <xsd:complexType name="tCorrelationPropertyBinding">

<xsd:complexContent>

<xsd:extension base="tBaseElement"> <xsd:sequence>

<xsd:element name="dataPath" type="tFormalExpression" minOccurs="1" maxOccurs="1"/> </xsd:sequence>

<xsd:attribute name="correlationPropertyRef" type="xsd:QName" use="required"/> </xsd:extension>

</xsd:complexContent> </xsd:complexType>

Table 8.39 – Correlation Property Retrieval Expression XML schema

<xsd:element name="correlationPropertyRetrievalExpression" type="tCorrelationPropertyRetrievalExpression"/> <xsd:complexType name="tCorrelationPropertyRetrievalExpression">

<xsd:complexContent> <xsd:extension base="tBaseElement">

<xsd:sequence>

<xsd:element name="messagePath" type="tFormalExpression" minOccurs="1" maxOccurs="1"/> </xsd:sequence>

<xsd:attribute name="messageRef" type="xsd:QName" use="required"/> </xsd:extension>

</xsd:complexContent> </xsd:complexType>

Table 8.40 – Correlation Subscription XML schema

<xsd:element name="correlationSubscription" type="tCorrelationSubscription"/> <xsd:complexType name=" tCorrelationSubscription ">

<xsd:complexContent>

<xsd:extension base="tBaseElement"> <xsd:sequence>

<xsd:element name="process" type="xsd:QName" use="required"/> <xsd:element ref="correlationKeyRef" minOccurs="1" maxOccurs="1"/>

<xsd:element name="correlationPropertyBinding" type="xsd:QName" minOccurs="0" maxOccurs="unbounded"/>

</xsd:sequence> </xsd:extension>

</xsd:complexContent> </xsd:complexType>

78

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