---
title: "9.4 Message Flow"
chapter: "9 Collaboration"
source: "OMG BPMN 2.0.2 — formal/2013-12-09"
pages: "119-123"
---

> 9 Collaboration · páginas 119-123 · [índice](../README.md)


<a id="sec-9-4"></a>
## 9.4 Message Flow


A **Message Flow** is used to show the flow of **Messages** between two Participants that are prepared to send and receive them. A **Message Flow** MUST connect two separate **Pools**. They connect either to the **Pool** boundary or to Flow Objects within the **Pool** boundary. They MUST NOT connect two objects within the same **Pool**. A **Message Flow** is a line with an open circle line start and an open arrowhead line end that MUST be drawn with a dashed single line (see Figure 9.11).


<a id="fig-9-11"></a>
![Figure 9.11 – A Message Flow](../figures/fig-9-11.png)

*Figure 9.11 – A Message Flow* (p. 119)


In Collaboration Diagrams (the view showing the **Choreography Process** Combined with Orchestration **Processes**), a **Message Flow** can be extended to show the **Message** that is passed from one Participant to another (see Figure 9.12).


<a id="fig-9-12"></a>
![Figure 9.12 – A Message Flow with an Attached Message](../figures/fig-9-12.png)

*Figure 9.12 – A Message Flow with an Attached Message* (p. 120)


If a **Choreography** is included in the **Collaboration**, then the **Message Flow** will “pass-through” a **Choreography Task** as it connects from one Participant to another (see Figure 9.13).


<a id="fig-9-13"></a>
![Figure 9.13 – A Message Flow passing through a Choreography Task](../figures/fig-9-13.png)

*Figure 9.13 – A Message Flow passing through a Choreography Task* (p. 120)


Figure 9.14 displays the class diagram of a Message Flow and its relationships to other BPMN elements. When a Message Flow is defined it is contained either within a Collaboration, a Choreography, or a


<a id="fig-9-14"></a>
![Figure 9.14 – The Message Flow Class Diagram](../figures/fig-9-14.png)

*Figure 9.14 – The Message Flow Class Diagram* (p. 121)


The **Message Flow** element inherits the attributes and model associations of BaseElement (see Table 8.5). Table 9.8 presents the additional attributes and model associations for the **Message Flow** element.


<a id="tab-9-8"></a>
**Table 9.8 – Message Flow attributes and model associations**

| Attribute Name | Description/Usage |
| --- | --- |
| **name**: string | Name is a text description of the **Message Flow**. |
| **sourceRef**: InteractionNode | The InteractionNode that the **Message Flow** is connecting from. Of the types of InteractionNode, only **Pools**/*Participants*, **Activities**, and **Events** can be the *source* of a **Message Flow**. |
| **targetRef**: InteractionNode | The InteractionNode that the **Message Flow** is connecting to. Of the types of InteractionNode, only **Pools**/*Participants*, **Activities**, and **Events** can be the *target* of a **Message Flow**. |
| **messageRef**: Message [0..1] | The messageRef model association defines the **Message** that is passed via the **Message Flow** (see page 91 for more details). |


<a id="sec-9-4-1"></a>
### 9.4.1 Interaction Node


The InteractionNode element is used to provide a single element as the source and target **Message Flow** associations (see Figure 9.14, above) instead of the individual associations of the elements that can connect to **Message Flows** (see above). Only the **Pool**/*Participant*, **Activity**, and **Event** elements can connect to **Message Flows.** The InteractionNode element is also used to provide a single element for source and target of **Conversation Links**, see page 131. The InteractionNode element does not have any attributes or model associations and does not inherit from any other **BPMN** element. Since **Pools**/*Participants*, **Activities**, and **Events** have their own attributes, model associations, and inheritances, additional attributes and model associations for the InteractionNode element are not necessary.


<a id="sec-9-4-2"></a>
### 9.4.2 Message Flow Associations


These elements are used to do mapping between two elements that both contain **Message Flows**. The MessageFlowAssociation provides the mechanism to match up the **Message Flows**. A MessageFlowAssociation is used when an (*outer*) diagram with **Message Flows** contains an (*inner*) diagram that also has **Message Flows**. It is used when:


- A Collaboration references a Choreography for inclusion between the Collaboration’s Pools (Participants). The **Message Flows** of the **Choreography** (the inner diagram) need to be mapped to the **Message Flows** of the **Collaboration** (the outer diagram).

- A Collaboration references a Conversation that contains Message Flows. The Message Flows of the **Conversation** can serve as a partial requirement for the **Collaboration**. Thus, the **Message Flows** of the **Conversation** (the inner diagram) need to be mapped to the **Message Flows** of the **Collaboration** (the outer diagram).

- A Choreography references a Conversation that contains Message Flows. The Message Flows of the **Conversation** can serve as a partial requirement for the **Choreography**. Thus, the Message Flows of the **Conversation** (the inner diagram) need to be mapped to the **Message Flows** of the **Choreography** (the outer diagram).


Figure 9.15 shows the class diagram for the MessageFlowAssociation element.


<a id="fig-9-15"></a>
![Figure 9.15 – MessageFlowAssociation class diagram](../figures/fig-9-15.png)

*Figure 9.15 – MessageFlowAssociation class diagram* (p. 123)


The MessageFlowAssociation element inherits the attributes and model associations of BaseElement (see Table 8.5). Table 9.9 presents the additional model associations for the MessageFlowAssociation element.


<a id="tab-9-9"></a>
**Table 9.9 – MessageFlowAssociation attributes and model associations**

| Attribute Name | Description/Usage |
| --- | --- |
| **innerMessageFlowRef**: Message Flow | This attribute defines the **Message Flow** of the referenced element (e.g., a **Choreography** to be used in a **Collaboration**) that will be mapped to the parent element (e.g., the **Collaboration**). |
| **outerMessageFlowRef**: Message Flow | This attribute defines the **Message Flow** of the parent element (e.g., a **Collaboration** references a **Choreography**) that will be mapped to the referenced element (e.g., the **Choreography**). |

