---
title: "12.2 BPMN Diagram Interchange (DI) Meta-model"
chapter: "12 BPMN Notation and Diagrams"
source: "OMG BPMN 2.0.2 — formal/2013-12-09"
pages: "368-378"
---

> 12 BPMN Notation and Diagrams · páginas 368-378 · [índice](../README.md)


<a id="sec-12-2"></a>
## 12.2 BPMN Diagram Interchange (DI) Meta-model


<a id="sec-12-2-1"></a>
### 12.2.1 Overview


The BPMN DI is an instance of the DI meta-model provided at Annex B. The basic concept of BPMN DI, as with DI in general, is that serializing a diagram [BPMNDiagram] for interchange requires the specification of a collection of shapes [BPMNShape] and edges [BPMNEdge] on a plane [BPMNPlane]. BPMNPlane, BPMNShape, and BPMNEdge MUST reference exactly one abstract syntax BPMN element from the BPMN model using the bpmnElement attribute. The only exception is for a Data Association connected to a Sequence Flow (See Figure 10.68). This is a visual short cut that actually normalizes two Data Associations within the BPMN model. In this case, the resolution is made from the BPMN DI attributes rather than the abstract syntax reference [bpmnElement] (See Table 12.35). The BPMN DI classes only define the visual properties used for depiction. All other properties that are REQUIRED for the unambiguous depiction of the BPMN element are derived from the referenced bpmnElement. Multiple depictions of a specific BPMN element in a single diagram is NOT allowed, except for Participants in a choreography (i.e., Participant Bands). For example, it is not allowed to depict a Task twice in the same diagram, but it is allowed to depict the same Task in two different diagrams. BPMN diagrams may be an incomplete or partial depiction of the content of the BPMN model. Some BPMN elements from a BPMN model may not be present in any of the diagram instances being interchanged. BPMN DI does not provide for any containment concept. The BPMNPlane is an ordered collection of mixed BPMNShape(s) and BPMNEdge(s). The order of the BPMNShape(s) and BPMNEdge(s) inside a BPMNPlane determines their Z-order (i.e., what is in front of what). BPMNShape(s) and BPMNEdge(s) that are meant to be depicted “on top” of other BPMNShape(s) and BPMNEdge(s) MUST appear after them in the BPMNPlane. Therefore, the exporting tool MUST order all BPMNShape(s) and BPMNEdge(s) such that the desired depiction can be rendered.


<a id="sec-12-2-2"></a>
### 12.2.2 Abstract Syntax


This sub clause introduces the Abstract Syntax of BPMN DI. BPMN DI is an instance of the DI meta-model provided at Annex B.


<a id="fig-12-1"></a>
![Figure 12.1 – BPMN Diagram](../figures/fig-12-1.png)

*Figure 12.1 – BPMN Diagram* (p. 369)


<a id="fig-12-2"></a>
![Figure 12.2 – BPMN Plane](../figures/fig-12-2.png)

*Figure 12.2 – BPMN Plane* (p. 369)


<a id="fig-12-3"></a>
![Figure 12.3 – BPMN Shape](../figures/fig-12-3.png)

*Figure 12.3 – BPMN Shape* (p. 369)


<a id="fig-12-4"></a>
![Figure 12.4 – BPMN Edge](../figures/fig-12-4.png)

*Figure 12.4 – BPMN Edge* (p. 370)


<a id="fig-12-5"></a>
![Figure 12.5 – BPMN Label](../figures/fig-12-5.png)

*Figure 12.5 – BPMN Label* (p. 370)


<a id="sec-12-2-3"></a>
### 12.2.3 Classifier Descriptions


<a id="sec-12-2-3-1"></a>
#### 12.2.3.1 BPMNDiagram [Class]


BPMNDiagram is a kind of diagram that depicts all or part of a BPMN model.


BPMNDiagram represents a depiction of all or part of a BPMN model. It specializes DI:: Diagram and redefines the root element (the top most diagram element) to be of type BPMNPlane. A BPMN diagram can also own a collection of BPMNStyle elements that are referenced by BPMNLabel elements in the diagram. These style elements represent the unique appearance styles used in the diagram.


- Figure 12.1 - BPMN Diagram

- DI::Diagram

- + plane : BPMNPlane [1] {redefines rootElement}

- + labelStyle : BPMNLabelStyle [*] {subsets style}


<a id="tab-12-1"></a>
**Table 12.1 – BPMNDiagram XML schema**

```xml
<xsd:complexType name="BPMNDiagram">
    <xsd:complexContent>
        <xsd:extension base="di:Diagram">
            <xsd:sequence>
                <xsd:element ref="bpmndi:BPMNPlane"/>
                <xsd:element ref="bpmndi:BPMNLabelStyle" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
        </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>
```


<a id="sec-12-2-3-2"></a>
#### 12.2.3.2 BPMNPlane [Class]


A BPMNPlane is the BPMNDiagram container of BPMNShape and BPMNEdge.


A BPMNPlane specializes DI:: Plane and redefines its model element reference to be of type (BPMN) BaseElement. A BPMNPlane can only reference a BaseElement of the types: Process, SubProcess, AdHocSubProcess, Transaction, Collaboration, Choreography or SubChoreography. BPMNPlane element is always owned by a BPMNDiagram and represents the root diagram element of that diagram. The plane represents a 2 dimensional surface with an origin at (0, 0) along the x and y axes with increasing coordinates to the right and bottom. Only positive coordinates are allowed for diagram elements that are nested in a BPMNPlane. This means that the union of all the nested elements’ bounds is deemed to be located at the plane’s origin point.


- Figure 12.1 - BPMN Diagram

- Figure 12.2 - BPMN Plane

- DI::Plane

- + bpmnElement : BaseElement [0..1] {redefines modelElement}


<a id="tab-12-2"></a>
**Table 12.2 – BPMNPlane XML schema**

```xml
<xsd:complexType name="BPMNPlane">
    <xsd:complexContent>
        <xsd:extension base="di:Plane">
            <xsd:attribute name="bpmnElement" type="xsd:QName"/>
        </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>
```


<a id="sec-12-2-3-3"></a>
#### 12.2.3.3 BPMNShape [Class]


BPMNShape is a kind of shape that can depict a BPMN model element.


BPMNShape represents a depiction of a (typically a node) BPMN model element. It specializes DI:: LabeledShape and redefines its model element reference to be of type (BPMN) BaseElement, allowing it to reference an element from a BPMN model. BPMNShape also contains an optional label of type BPMNLabel that can be nested in the shape when it has a visible textual label with its own bounding box. The shape also contains a number of normative notational options that can be specified for different types of BPMN elements depicted by the shape. Those options, each represented by a separate property, and described below, allow for recording the specific notational style desired for the shape. All BPMNShape elements are owned directly by a BPMNPlane (that is the root element in a BPMNDiagram), i.e., shapes are not nested within each other in the BPMN DI model although they may appear that way when depicted. The bounds of a BPMNShape are always relative to that plane’s origin point and are REQUIRED to be positive coordinates. Note that the bounds’ x and y coordinates are the position of the upper left corner of the shape (relative to the upper left corner of the plane).


- Figure 12.3 - BPMN Shape

- Figure 12.4 - BPMN Edge

- DI::LabeledShape

- + isHorizontal : Boolean [0..1]

- + isExpanded : Boolean [0..1]

- + isMarkerVisible : Boolean [0..1]

- + participantBandKind : ParticipantBandKind [0..1]

- + isMessageVisible : Boolean [0..1]

- + choreographyActivityShape : BPMNShape [0..1]

- + bpmnElement : BaseElement [0..1] {redefines modelElement}

- + label : BPMNLabel [0..1] {subsets ownedLabel}


<a id="tab-12-3"></a>
**Table 12.3 – BPMNShape XML schema**

```xml
<xsd:complexType name="BPMNShape">
    <xsd:complexContent>
        <xsd:extension base="di:LabeledShape">
            <xsd:sequence>
                <xsd:element ref="bpmndi:BPMNLabel" minOccurs="0"/>
            </xsd:sequence>
            <xsd:attribute name="bpmnElement" type="xsd:QName"/>
            <xsd:attribute name="isHorizontal" type="xsd:boolean"/>
            <xsd:attribute name="isExpanded" type="xsd:boolean"/>
            <xsd:attribute name="isMarkerVisible" type="xsd:boolean"/>
            <xsd:attribute name="isMessageVisible" type="xsd:boolean"/>
            <xsd:attribute name="participantBandKind" type="bpmndi:ParticipantBandKind"/>
            <xsd:attribute name="choreographyActivityShape" type="xsd:QName"/>
        </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>
```


<a id="sec-12-2-3-4"></a>
#### 12.2.3.4 ParticipantBandKind [Enumeration]


ParticipantBandKind defines the type of Participant Band to depict.


Participant bands can be depicted in 3 ways:


1. a top band is rectangular with rounded corners at the top

2. a middle band is rectangular

3. a bottom band is rectangular with rounded corners at the bottom


Participant bands can be depicted in 2 shadings:


1. initiating (the band should not be shaded)

2. non_initiating (the band should be shaded)

- Figure 12.3 - BPMN Shape

- top_initiating - the band should be depicted as a non shaded top band

- middle_initiating - the band should be depicted as a non shaded middle band

- bottom_initiating - the band should be depicted as a non shaded bottom band

- top_non_initiating - the band should be depicted as a shaded top band

- middle_ non_initiating - the band should be depicted as a shaded middle band

- bottom_ non_initiating - the band should be depicted as a shaded bottom band


<a id="sec-12-2-3-5"></a>
#### 12.2.3.5 BPMNEdge [Class]


BPMNEdge is a kind of edge that can depict a relationship between two BPMN model elements.


BPMNEdge represents a depiction of a relationship between two (source and target) BPMN model elements. It specializes DI:: LabeledEdge and redefines its model element reference to be of type (BPMN) BaseElement, allowing it to reference a relationship element from a BPMN model. BPMNEdge also redefines its source and target references to be of type DiagramElement (either BPMNShape or BPMNEdge). The source or target definition should only be present if the edge is depicted between a different source or target than the one referenced by the BPMN model element of the BPMNEdge. Only the different source or target is REQUIRED. Both attributes should be present only if both are different. This is the case, for instance, if a Message Flow target is not depicted in the current diagram because it is inside a black box Pool. The Message Flow could then define its target as being the BPMNShape depicting the Pool to connect it to the boundary of that black box Pool. BPMNEdge also contains an optional label of type BPMNLabel that can be nested in the edge when it has a visible textual label with its own bounding box. All BPMNEdge elements are owned directly by a BPMNPlane (that is the root element in a BPMNDiagram). The waypoints of BPMNEdge are always relative to that plane’s origin point and are REQUIRED to be positive coordinates.


- Figure 12.4 - BPMN Edge

- DI::LabeledEdge

- + label : BPMNLabel [0..1] {subsets ownedLabel}

- + bpmnElement : BaseElement [0..1] {redefines modelElement}

- + sourceElement : DiagramElement [0..1] {redefines source}

- + targetElement : DiagramElement [0..1] {redefines target}

- messageVisibleKind : MessageVisibleKind [0..1]


<a id="tab-12-4"></a>
**Table 12.4 – BPMNEdge XML schema**

```xml
<xsd:complexType name="BPMNEdge">
    <xsd:complexContent>
        <xsd:extension base="di:LabeledEdge">
          <xsd:sequence>
                <xsd:element ref="bpmndi:BPMNLabel" minOccurs="0" />
            </xsd:sequence>
            <xsd:attribute name="bpmnElement" type="xsd:QName" />
            <xsd:attribute name="sourceElement" type="xsd:QName" />
            <xsd:attribute name="targetElement" type="xsd:QName" />
            <xsd:attribute name="messageVisibleKind" type="bpmndi:MessageVisibleKind" />
        </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>
```


<a id="sec-12-2-3-6"></a>
#### 12.2.3.6 MessageVisibleKind [Enumeration]


MessageVisibleKind defines the type of envelope that is visible.


MessageVisibleKind is applicable only to Participant Band and Message Flow. For Message Flow, the envelope should be positioned in the middle of the edge. For Participant Band, the envelope should be positioned over (for top band) or under (for bottom band) and connected to the band using an association. Note that only Choreography Task Participant Bands are allowed to show the envelope. Middle bands being only used for a SubChoreography can thus not have envelope showing.


- Figure 12.3 - BPMN Shape

- initiating - The envelope should not be shaded.

- non_inititating - The envelope should be shaded.


<a id="sec-12-2-3-7"></a>
#### 12.2.3.7 BPMNLabel [Class]


BPMNLabel is a kind of label that depicts textual info about a BPMN element.


BPMNLabel represents a depiction of some textual information about a BPMN element. It specializes DI:: Label and redefines its style reference to be of type BPMNLabelStyle, which contains information about the appearance of the label (e.g., the chosen font). The referenced style is owned by the diagram that nests the label. A BPMN label is not a top-level element but is always nested inside either a BPMNShape or a BPMNEdge. It does not have its own reference to a BPMN element but rather inherits that reference (if any) from its parent shape or edge. The textual info depicted by the label is derived from that referenced BPMN element.


The bounds of BPMNLabel are always relative to the containing plane’s origin point. Note that the bounds’ x and y coordinates are the position of the upper left corner of the label (relative to the upper left corner of the plane).


- Figure 12.3 - BPMN Shape

- Figure 12.4 - BPMN Edge

- Figure 12.5 - BPMN Label

- DI::Label

- + labelStyle : BPMNLabelStyle [0..1] {redefines style}


<a id="tab-12-5"></a>
**Table 12.5 – BPMNLabel XML schema**

```xml
<xsd:complexType name="BPMNLabel">
    <xsd:complexContent>
        <xsd:extension base="di:Label">
            <xsd:attribute name="labelStyle" type="xsd:QName" />
        </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>
```


<a id="sec-12-2-3-8"></a>
#### 12.2.3.8 BPMNLabelStyle [Class]


BPMNLabelStyle is a kind of style that gives the appearance options for a BPMNLabel.


BPMNLabelStyle represents the appearance options for elements of type BPMNLabel. It specializes DI:: Style and contains a description of a font that is used in depicting a BPMNLabel. One or more labels may reference the same BPMNLabelStyle element, which must be owned by a BPMNDiagram.


- Figure 12.1 - BPMN Diagram

- Figure 12.5 - BPMN Label

- DI::Style

- + font : Font[1] - a font object that describes the properties of the font used for depicting the labels that reference this style.


<a id="tab-12-6"></a>
**Table 12.6 – BPMNLabelStyle XML schema**

```xml
<xsd:complexType name="BPMNLabelStyle">
    <xsd:complexContent>
        <xsd:extension base="di:Style">
            <xsd:sequence>
                <xsd:element ref="dc:Font"/>
            </xsd:sequence>
        </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>
```


<a id="sec-12-2-4"></a>
### 12.2.4 Complete BPMN DI XML Schema


<a id="tab-12-7"></a>
**Table 12.7 – Complete BPMN DI XML schema**

```xml
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" targetNamespace="http://www.omg.org/spec/BPMN/20100524/DI"
        elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xsd:import namespace="http://www.omg.org/spec/DD/20100524/DC" schemaLocation="DC.xsd" />
    <xsd:import namespace="http://www.omg.org/spec/DD/20100524/DI" schemaLocation="DI.xsd" />
    <xsd:element name="BPMNDiagram" type="bpmndi:BPMNDiagram" />
    <xsd:element name="BPMNPlane" type="bpmndi:BPMNPlane" />
    <xsd:element name="BPMNLabelStyle" type="bpmndi:BPMNLabelStyle" />
    <xsd:element name="BPMNShape" type="bpmndi:BPMNShape" substitutionGroup="di:DiagramElement" />
    <xsd:element name="BPMNLabel" type="bpmndi:BPMNLabel" />
    <xsd:element name="BPMNEdge" type="bpmndi:BPMNEdge" substitutionGroup="di:DiagramElement" />
    <xsd:complexType name="BPMNDiagram">
        <xsd:complexContent>
            <xsd:extension base="di:Diagram">
                <xsd:sequence>
                    <xsd:element ref="bpmndi:BPMNPlane" />
                    <xsd:element ref="bpmndi:BPMNLabelStyle" maxOccurs="unbounded" minOccurs="0" />
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
     <xsd:complexType name="BPMNPlane">
          <xsd:complexContent>
              <xsd:extension base="di:Plane">
                  <xsd:attribute name="bpmnElement" type="xsd:QName" />
              </xsd:extension>
          </xsd:complexContent>
     </xsd:complexType>
     <xsd:complexType name="BPMNEdge">
          <xsd:complexContent>
              <xsd:extension base="di:LabeledEdge">
                  <xsd:sequence>
                      <xsd:element ref="bpmndi:BPMNLabel" minOccurs="0" />
                  </xsd:sequence>
                  <xsd:attribute name="bpmnElement" type="xsd:QName" />
                  <xsd:attribute name="sourceElement" type="xsd:QName" />
                  <xsd:attribute name="targetElement" type="xsd:QName" />
                  <xsd:attribute name="messageVisibleKind" type="bpmndi:MessageVisibleKind" />
              </xsd:extension>
          </xsd:complexContent>
     </xsd:complexType>
     <xsd:complexType name="BPMNShape">
          <xsd:complexContent>
              <xsd:extension base="di:LabeledShape">
                  <xsd:sequence>
                      <xsd:element ref="bpmndi:BPMNLabel" minOccurs="0" />
                  </xsd:sequence>
                  <xsd:attribute name="bpmnElement" type="xsd:QName" />
                  <xsd:attribute name="isHorizontal" type="xsd:boolean" />
                  <xsd:attribute name="isExpanded" type="xsd:boolean" />
                  <xsd:attribute name="isMarkerVisible" type="xsd:boolean" />
                  <xsd:attribute name="isMessageVisible" type="xsd:boolean" />
                  <xsd:attribute name="participantBandKind" type="bpmndi:ParticipantBandKind" />
                  <xsd:attribute name="choreographyActivityShape" type="xsd:QName"/>
              </xsd:extension>
          </xsd:complexContent>
     </xsd:complexType>
     <xsd:complexType name="BPMNLabel">
          <xsd:complexContent>
              <xsd:extension base="di:Label">
                  <xsd:attribute name="labelStyle" type="xsd:QName" />
              </xsd:extension>
          </xsd:complexContent>
     </xsd:complexType>
     <xsd:complexType name="BPMNLabelStyle">
          <xsd:complexContent>
              <xsd:extension base="di:Style">
                  <xsd:sequence>
                      <xsd:element ref="dc:Font" />
                  </xsd:sequence>
              </xsd:extension>
          </xsd:complexContent>
     </xsd:complexType>
     <xsd:simpleType name="ParticipantBandKind">
          <xsd:restriction base="xsd:string">
              <xsd:enumeration value="top_initiating" />
              <xsd:enumeration value="middle_initiating" />
              <xsd:enumeration value="bottom_initiating" />
              <xsd:enumeration value="top_non_initiating" />
              <xsd:enumeration value="middle_non_initiating" />
              <xsd:enumeration value="bottom_non_initiating" />
          </xsd:restriction>
     </xsd:simpleType>
     <xsd:simpleType name="MessageVisibleKind">
          <xsd:restriction base="xsd:string">
              <xsd:enumeration value="initiating" />
              <xsd:enumeration value="non_initiating" />
          </xsd:restriction>
     </xsd:simpleType>
 </xsd:schema>
```

