The correlation itself is defined in terms of correlation fields, which denote a subset of the conceptual data that should be used for the correlation. (For example, if the conceptual data comprises an order, then the correlation field might be denoted by the order ID).

In some applications it is useful to allow more Messages to be sent between Participants when a Collaboration is carried out than are contained in the Collaboration model. This enables Participants to exchange other Messages as needed without changing the Collaboration. If the isClosed attribute of a Collaboration has a value of false or no value, then Participants MAY send Messages to each other without additional Message Flows in the Collaboration. If the isClosed attribute of a Collaboration has a value of true, then Participants MAY NOT send Messages to each other without additional Message Flows in the Collaboration. If a Collaboration contains a Choreography, then the value of the isClosed attribute MUST be the same in both. Restrictions on unmodeled messaging specified with isClosed apply only under the Collaboration containing the restriction. PartnerEntities and PartnerRoles of the Participants MAY send Messages to each other under other Choreographies, Collaborations, and

Conversations.

9.6Process within Collaboration

Processes can be included in a Collaboration diagram. A Participant/Pool within the Collaboration can contain a Process (but they are NOT REQUIRED). An example of this is shown in Figure 9.4.

When a Lane (in a Process) represents a Conversation, the Flow Elements in the Lane (or elements nested or called in them) that send or receive Messages MUST do so as part of the Conversation represented by the Lane.

9.7Choreography within Collaboration

Choreographies can be included in a Collaboration diagram. A Collaboration specifies how the Participants and

Message Flows in the Choreography are matched up with the Participants and Message Flows in the

Collaboration. A Collaboration uses ParticipantAssociations and MessageFlowAssociations for this purpose.

To handle the Participants, the innerParticipant of a ParticipantAssociation refers to a Participant in the

Choreography, while the outerParticipant refers to a Participant in the Collaboration containing the

Choreography. This mapping matches the Participant Bands of the Choreography Activities in the Choreography to the Pools in the Collaboration. Thus, the names in the Participant Bands are NOT REQUIRED (see Figure 9.32).

136

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

Credit Agency

Credit

Response

Request Credit

Provide Credit

Score

Score

 

 

Credit

 

 

 

 

 

Request

 

 

 

 

Customer

 

 

 

Customer

 

Info

Credit ID

 

 

 

 

 

Info

Seller

 

 

 

Generate

Request

Receive

Update

[Updated]

 

Customer

 

Credit ID

Credit Score

Credit Score

 

 

 

 

Info

 

 

 

 

 

 

Figure 9.32 – An example of a Choreography within a Collaboration

To handle Message Flows, the innerMessageFlow of a MessageFlowAssociation refers to a Message Flow in the Choreography, while the outerMessageFlow refers to a Message Flow in the Collaboration containing the Choreography. This mapping matches the Message Flows of the Choreography (which are not visible) to the

Message Flows in the Collaboration (which are visible). This allows the Message Flows of the Collaboration to be “wired up” through the appropriate Choreography Activity in the Choreography (see Figure 9.32).

The ParticipantAssociations might be derived from the partnerEntities or partnerRoles of the

Participants. For example, if a Choreography Activity has a Participant with the same partnerEntity as a Participant in the Collaboration containing the Choreography, then these two Participants could be assumed to be the inner and outerParticipants of a ParticipantAssociation. Similarly, Message Flows that reference the same Message in a Call Choreography Activity and the Collaboration, could be automatically synchronized by a MessageFlowAssociation, if only one Message Flow has that Message.

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

137

Figure 9.33 – Choreography within Collaboration class diagram

9.8Collaboration Package XML Schemas

Table 9.15 – Call Conversation XML schema

<xsd:element name="callConversation" type="tCallConversation" substitutionGroup="conversationNode"/> <xsd:complexType name="tCallConversation">

<xsd:complexContent>

<xsd:extension base="tConversationNode">

<xsd:sequence>

<xsd:element ref="participantAssociation" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence>

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

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

Table 9.16 – Collaboration XML schema

<xsd:element name="collaboration" type="tCollaboration" substitutionGroup="rootElement"/> <xsd:complexType name="tCollaboration">

<xsd:complexContent>

<xsd:extension base="tRootElement">

<xsd:sequence>

<xsd:element name="choreography" minOccurs="0" maxOccurs="unbounded"/>

138

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

<xsd:element ref="participant" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="messageFlow" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="artifact" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="conversationNode" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="conversationLink" minOccurs="0" maxOccurs="unbounded"/>

<xsd:element name="conversationAssociation" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="participantAssociation" minOccurs="0" maxOccurs="unbounded"/>

<xsd:element name="MessageFlowAssociation" type="tMessageFlowAssociation" minOccurs="0" maxOccurs="unbounded"/>

<xsd:element ref="correlationKey" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence>

<xsd:attribute name="name" type="xsd:string"/>

<xsd:attribute name="isClosed" type="xsd:boolean" default="false"/> </xsd:extension>

</xsd:complexContent>

</xsd:complexType>

Table 9.17 – Conversation XML schema

<xsd:element name="conversation" type="tConversation" substitutionGroup="conversationNode"/> <xsd:complexType name="tConversation">

<xsd:complexContent>

<xsd:extension base="tConversationNode"/> </xsd:complexContent>

</xsd:complexType>

Table 9.18 – ConversationAssociation XML schema

<xsd:element name="conversationAssociation" type="tConversationAssociation"/> <xsd:complexType name="tConversationAssociation">

<xsd:complexContent>

<xsd:extension base="tBaseElement">

<xsd:attribute name="innerConversationNodeRef" type="xsd:QName" use="required"/> <xsd:attribute name="outerConversationNodeRef" type="xsd:QName" use="required"/>

</xsd:extension> </xsd:complexContent>

</xsd:complexType>

Table 9.19 – ConversationAssociation XML schema

<xsd:element name="conversationLink" type="tConversationLink"/> <xsd:complexType name="tConversationLink">

<xsd:complexContent>

<xsd:extension base="tBaseElement">

<xsd:attribute name="name" type="xsd:string" use="optional"/> <xsd:attribute name="sourceRef" type="xsd:QName" use="required"/> <xsd:attribute name="targetRef" type="xsd:QName" use="required"/>

</xsd:extension> </xsd:complexContent>

</xsd:complexType>

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

139

Table 9.20 – ConversationNode XML schema

<xsd:element name="conversation" type="tConversation" substitutionGroup="rootElement"/> <xsd:complexType name="tConversation">

<xsd:complexContent>

<xsd:extension base="tCallableElement">

<xsd:sequence>

<xsd:element ref="conversationNode" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="participant" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="artifact" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="messageFlow" minOccurs="0" maxOccurs="unbounded"/>

<xsd:element name="messageFlowRef" type="xsd:QName" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="correlationKey" minOccurs="0" maxOccurs="unbounded"/>

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

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

Table 9.21 – Conversation Node XML schema

<xsd:element name="conversationNode" type="tConversationNode"/> <xsd:complexType name="tConversationNode" abstract="true">

<xsd:complexContent>

<xsd:extension base="tBaseElement">

<xsd:sequence>

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

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

</xsd:sequence>

<xsd:attribute name="conversationRef" type="xsd:QName"/> <xsd:attribute name="correlationKeyRef" type="xsd:QName"/>

</xsd:extension>

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

Table 9.22 – Global Conversation XML schema

<xsd:element name="globalConversation" type="tGlobalConversation" substitutionGroup="collaboration"/> <xsd:complexType name="tGlobalConversation">

<xsd:complexContent>

<xsd:extension base="tCollaboration"/>

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

Table 9.23 – MessageFlow XML schema

<xsd:element name="messageFlow" type="tMessageFlow"/> <xsd:complexType name="tMessageFlow">

<xsd:complexContent>

<xsd:extension base="tBaseElement">

140

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

<xsd:attribute name="name" type="xsd:string" use="optional"/> <xsd:attribute name="sourceRef" type="xsd:QName" use="required"/> <xsd:attribute name="targetRef" type="xsd:QName" use="required"/> <xsd:attribute name="messageRef" type="xsd:QName"/>

</xsd:extension> </xsd:complexContent>

</xsd:complexType>

Table 9.24 – MessageFlowAssociation XML schema

<xsd:element name="messageFlowAssociation" type="tMessageFlowAssociation"/> <xsd:complexType name="tMessageFlowAssociation">

<xsd:complexContent>

<xsd:extension base="tBaseElement">

<xsd:attribute name="innerMessageFlowRef" type="xsd:QName" use="required"/> <xsd:attribute name="outerMessageFlowRef" type="xsd:QName" use="required"/>

</xsd:extension> </xsd:complexContent>

</xsd:complexType>

Table 9.25 – Participant XML schema

<xsd:element name="participant" type="tParticipant"/> <xsd:complexType name="tParticipant">

<xsd:complexContent>

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

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

>

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

>

<xsd:element ref="participantMultiplicity" minOccurs="0" maxOccurs="1"/> </xsd:sequence>

<xsd:attribute name="name" type="xsd:string"/>

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

</xsd:complexContent>

</xsd:complexType>

Table 9.26 – ParticipantAssociation XML schema

<xsd:element name="participantAssociation" type="tParticipantAssociation"/> <xsd:complexType name="tParticipantAssociation">

<xsd:complexContent>

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

<xsd:element name="innerParticipantRef" type="xsd:QName" use="required"/> <xsd:element name="outerParticipantRef" type="xsd:QName" use="required"/>

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

</xsd:complexContent>

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

141

</xsd:complexType>

Table 9.27 – ParticipantMultiplicity XML schema

<xsd:element name="participantMultiplicity" type="tParticipantMultiplicity"/> <xsd:complexType name="tParticipantMultiplicity">

<xsd:complexContent>

<xsd:extension base="tBaseElement"> <xsd:attribute name="minimum" type="xsd:int"/> <xsd:attribute name="maximum" type="xsd:int"/>

</xsd:extension>

</xsd:complexContent>

</xsd:complexType>

Table 9.28 – PartnerEntity XML schema

<xsd:element name="partnerEntity" type="tPartnerEntity" substitutionGroup="rootElement"/> <xsd:complexType name="tPartnerEntity">

<xsd:complexContent>

<xsd:extension base="tRootElement"> <xsd:attribute name="name" type="xsd:string"/>

</xsd:extension>

</xsd:complexContent>

</xsd:complexType>

Table 9.29 – PartnerRole XML schema

<xsd:element name="partnerRole" type="tPartnerRole" substitutionGroup="rootElement"/> <xsd:complexType name="tPartnerRole">

<xsd:complexContent>

<xsd:extension base="tRootElement"> <xsd:attribute name="name" type="xsd:string"/>

</xsd:extension>

</xsd:complexContent>

</xsd:complexType>

Table 9.30 – Sub-Conversation XML schema

<xsd:element name="subConversation" type="tSubConversation" substitutionGroup="conversationNode"/> <xsd:complexType name="tSubConversation">

<xsd:complexContent>

<xsd:extension base="tConversationNode">

<xsd:sequence>

<xsd:element ref="conversationNode" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence>

</xsd:extension>

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

142

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