---
title: "8.3 Foundation"
chapter: "8 BPMN Core Structure"
source: "OMG BPMN 2.0.2 — formal/2013-12-09"
pages: "53-63"
---

> 8 BPMN Core Structure · páginas 53-63 · [índice](../README.md)


<a id="sec-8-3"></a>
## 8.3 Foundation


The Foundation package contains classes that are shared among other packages in the Core (see Figure 8.5) of an abstract syntax model.


<a id="fig-8-5"></a>
![Figure 8.5 – Classes in the Foundation package](../figures/fig-8-5.png)

*Figure 8.5 – Classes in the Foundation package* (p. 53)


<a id="sec-8-3-1"></a>
### 8.3.1 Base Element


BaseElement is the abstract super class for most BPMN elements. It provides the attributes id and documentation, which other elements will inherit. Table 8.5 presents the attributes and model associations for the BaseElement.


<a id="tab-8-5"></a>
**Table 8.5 – BaseElement attributes and model associations**

| Attribute Name | Description/Usage |
| --- | --- |
| **id**: string | This attribute is used to uniquely identify BPMN elements. The id is REQUIRED if this element is referenced or intended to be referenced by something else. If the element is not currently referenced and is never intended to be referenced, the id MAY be omitted. |
| **documentation**: Documentation [0..*] | This attribute is used to annotate the BPMN element, such as descriptions and other documentation. |
| **extensionDefinitions**: ExtensionDefinition [0..*] | This attribute is used to attach additional attributes and associations to any BaseElement. This association is not applicable when the XML schema interchange is used, since the XSD mechanisms for supporting anyAttribute and any element already satisfy this requirement. See page 57 for additional information on extensibility. |
| **extensionValues**: ExtensionAttributeValue [0..*] | This attribute is used to provide values for extended attributes and model associations. This association is not applicable when the XML schema interchange is used, since the XSD mechanisms for supporting anyAttribute and any element already satisfy this requirement. See page 55 for additional information on extensibility. |


<a id="sec-8-3-2"></a>
### 8.3.2 Documentation


All **BPMN** elements that inherit from the BaseElement will have the capability, through the Documentation element, to have one (1) or more text descriptions of that element. The Documentation element inherits the attributes and model associations of BaseElement (see Table 8.5). Table 8.6 presents the additional attributes of the Documentation element.


<a id="tab-8-6"></a>
**Table 8.6 – Documentation attributes**

| Attribute Name | Description/Usage |
| --- | --- |
| **text**: string | This attribute is used to capture the text descriptions of a **BPMN** element. |
| **textFormat**: string | This attribute identifies the format of the text. It MUST follow the mime-type format. The default is "text/plain." |


In the **BPMN** schema, the tDocumentation complexType does not contain a text attribute or element. Instead, the documentation text is expected to appear in the body of the documentation element. For example:


```xml
<documentation>An example of how the documentation text is entered.</documentation>
```


<a id="sec-8-3-3"></a>
### 8.3.3 Extensibility


The **BPMN** metamodel is aimed to be extensible. This allows **BPMN** adopters to extend the specified metamodel in a way that allows them to be still **BPMN**-compliant. It provides a set of extension elements, which allows **BPMN** adopters to attach additional attributes and elements to standard and existing **BPMN** elements. This approach results in more interchangeable models, because the standard elements are still intact and can still be understood by other **BPMN** adopters. It’s only the additional attributes and elements that MAY be lost during interchange.


<a id="fig-8-6"></a>
![Figure 8.6 – Extension class diagram](../figures/fig-8-6.png)

*Figure 8.6 – Extension class diagram* (p. 55)


A **BPMN** Extension basically consists of four different elements:


1. Extension

2. ExtensionDefinition

3. ExtensionAttributeDefinition

4. ExtensionAttributeValue


The core elements of an Extension are the ExtensionDefinition and ExtensionAttributeDefinition. The latter defines a list of attributes that can be attached to any **BPMN** element. The attribute list defines the name and type of the new attribute. This allows **BPMN** adopters to integrate any meta model into the **BPMN** meta model and reuse already existing model elements. The ExtensionDefinition itself can be created independent of any **BPMN** element or any **BPMN** definition. In order to use an ExtensionDefinition within a **BPMN** model definition (Definitions element), the ExtensionDefinition MUST be associated with an Extension element that binds the ExtensionDefinition to a specific **BPMN** model definition. The Extension element itself is contained within the **BPMN** element Definitions and therefore available to be associated with any **BPMN** element making use of the


Every **BPMN** element which subclasses the **BPMN** BaseElement can be extended by additional attributes. This works by associating a **BPMN** element with an ExtensionDefinition, which was defined at the **BPMN** model definitions level (element Definitions). Additionally, every “extended” **BPMN** element contains the actual extension attribute value. The attribute value, defined by the element ExtensionAttributeValue contains the value of type Element. It also has an association to the corresponding attribute definition.


<a id="sec-extension"></a>
#### Extension


The Extension element binds/imports an ExtensionDefinition and its attributes to a **BPMN** model definition. Table 8.7 presents the attributes and model associations for the Extension element.


<a id="tab-8-7"></a>
**Table 8.7 – Extension attributes and model associations**

| Attribute Name | Description/Usage |
| --- | --- |
| **mustUnderstand**: boolean [0..1] = | This flag defines if the semantics defined by the extension definition and its |
| False | attribute definition MUST be understood by the BPMN adopter in order to process the BPMN model correctly. Defaults to False. |
| **definition**: ExtensionDefinition | Defines the content of the extension. Note that in the XML schema, this definition is provided by an external XML schema file and is simply referenced by QName. |


<a id="sec-extensiondefinition"></a>
#### ExtensionDefinition


The ExtensionDefinition class defines and groups additional attributes. This type is not applicable when the XML schema interchange is used, since XSD Complex Types already satisfy this requirement. Table 8.8 presents the attributes and model associations for the ExtensionDefinition element.


<a id="tab-8-8"></a>
**Table 8.8 – ExtensionDefinition attributes and model associations**

| Attribute Name | Description/Usage |
| --- | --- |
| **name**: string | The name of the extension. This is used as a namespace to uniquely identify the extension content. |
| **extensionAttributeDefinitions**: ExtensionAttributeDefinition [0..*] | The specific attributes that make up the extension. |


<a id="sec-extensionattributedefinition"></a>
#### ExtensionAttributeDefinition


The ExtensionAttributeDefinition defines new attributes. This type is not applicable when the XML schema interchange is used; since the XSD mechanisms for supporting “AnyAttribute” and “Any” type already satisfy this requirement. Table 8.9 presents the attributes for the ExtensionAttributeDefinition element.


<a id="tab-8-9"></a>
**Table 8.9 – ExtensionAttributeDefinition attributes**

| Attribute Name | Description/Usage |
| --- | --- |
| **name**: string | The name of the extension attribute. |
| **type**: string | The type that is associated with the attribute. |
| **isReference**: boolean [0..1] = False | Indicates if the attribute value will be referenced or contained. |


<a id="sec-extensionattributevalue"></a>
#### ExtensionAttributeValue


The ExtensionAttributeValue contains the attribute value. This type is not applicable when the XML schema interchange is used; since the XSD mechanisms for supporting “AnyAttribute” and “Any” type already satisfy this requirement. Table 8.10 presents the model associations for the ExtensionAttributeValue element.


<a id="tab-8-10"></a>
**Table 8.10 – ExtensionAttributeValue model associations**

| Attribute Name | Description/Usage |
| --- | --- |
| **value**: [Element [0..1] | The contained attribute value, used when the associated ExtensionAttributeDefinition.isReference is false. The type of this Element MUST conform to the type specified in the associated ExtensionAttributeDefinition. |
| **valueRef**: [Element [0..1] | The referenced attribute value, used when the associated ExtensionAttributeDefinition.isReference is true. The type of this Element MUST conform to the type specified in the associated ExtensionAttributeDefinition. |
| **extensionAttributeDefinition**: ExtensionAttributeDefinition | Defines the extension attribute for which this value is being provided. |


<a id="sec-extensibility-xml-schemas"></a>
#### Extensibility XML Schemas


<a id="tab-8-11"></a>
**Table 8.11 – Extension XML schema**

```xml
<xsd:element name="extension" type="tExtension"/>
<xsd:complexType name="tExtension">
    <xsd:sequence>
        <xsd:element ref="documentation" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="definition" type="xsd:QName"/>
    <xsd:attribute name="mustUnderstand" type="xsd:boolean" use="optional"/>
</xsd:complexType>
```


<a id="sec-xml-example"></a>
#### XML Example


This example shows a **Task**, defined the **BPMN** Core, being extended with Inputs and Outputs defined outside of the Core.


<a id="tab-8-12"></a>
**Table 8.12 – Example Core XML schema**

```xml
<xsd:schema ...>
        ...
    <xsd:element name="task" type="tTask"/>
    <xsd:complexType name="tTask">
        <xsd:complexContent>
            <xsd:extension base="tActivity"/>
        </xsd:complexContent>
    </xsd:complexType>
        ...
</xsd:schema>
```


<a id="tab-8-13"></a>
**Table 8.13 – Example Extension XML schema**

```xml
<xsd:schema ...>
        ...
    <xsd:group name="dataRequirements">
        <xsd:sequence>
            <xsd:element ref="dataInput" minOccurs="0" maxOccurs="unbounded" />
            <xsd:element ref="dataOutput" minOccurs="0" maxOccurs="unbounded" />
            <xsd:element ref="inputSet" minOccurs="0" maxOccurs="unbounded" />
            <xsd:element ref="outputSet" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
    </xsd:group>
        ...
</xsd:schema>
```


<a id="tab-8-14"></a>
**Table 8.14 – Sample XML instance**

```xml
<bpmn:definitions id=”ID_1” ...>
        ...
    <bpmn:extension mustUnderstand="true" definition="bpmn:dataRequirements"/>
        ...
    <bpmn:task name="Retrieve Customer Record" id="ID_2">
        <bpmn:dataInput name="Order Input" id="ID_3">
            <bpmn:typeDefinition typeRef="bo:Order" id="ID_4"/>
        </bpmn:dataInput>
        <bpmn:dataOutput name="Customer Record Output" id="ID_5">
            <bpmn:typeDefinition typeRef="bo:CustomerRecord" id="ID_6"/>
        </bpmn:dataOutput>
        <bpmn:inputSet name="Inputs" id="ID_7" dataInputRefs="ID_3"/>
        <bpmn:outputSet name="Outputs" id="ID_8" dataOutputRefs="ID_5"/>
    </bpmn:task>
        ...
</bpmn:definitions>
```


<a id="sec-8-3-4"></a>
### 8.3.4 External Relationships


It is the intention of this International Standard to cover the basic elements necessary for the construction of semantically rich and syntactically valid **Process** models to be used in the description of **Processes**, **Choreographies**, and business operations in multiple levels of abstraction. As the International Standard indicates, extension capabilities enable the enrichment of the information described in **BPMN** and supporting models to be augmented to fulfill particularities of a given usage model. These extensions’ intention is to extend the semantics of a given **BPMN** Artifact to provide specialization of intent or meaning.


**Process** models do not exist in isolation and generally participate in larger, more complex business and system development **Processes**. The intention of the following element is to enable **BPMN** Artifacts to be integrated in these development **Processes** via the specification of a non-intrusive identity/relationship model between **BPMN** Artifacts and elements expressed in any other addressable domain model. The ‘identity/relationship’ model is reduced to the creation of families of typed relationships that enable **BPMN** and non- **BPMN** Artifacts to be related in non intrusive manner. By simply defining ‘relationship types’ that can be associated with elements in the **BPMN** Artifacts and arbitrary elements in a given addressable domain model, it enables the extension and integration of **BPMN** models into larger system/development **Processes**. It is that these extensions will enable, for example, the linkage of ‘derivation’ or ‘definition’ relationships between UML artifacts and **BPMN** Artifacts in novel ways. So, a UML use case could be related to a **Process** element in the **BPMN** International Standard without affecting the nature of the Artifacts themselves, but enabling different integration models that traverse specialized relationships. Simply, the model enables the external specification of augmentation relationships between **BPMN** Artifacts and arbitrary relationship classification models, these external models, via traversing relationships declared in the external definition allow for linkages between **BPMN** elements and other structured or non-structured metadata definitions. The UML model for this International Standard follows a simple extensible pattern as shown below; where named relationships can be established by referencing objects that exist in their given namespaces.


<a id="fig-8-7"></a>
![Figure 8.7 – External Relationship Metamodel](../figures/fig-8-7.png)

*Figure 8.7 – External Relationship Metamodel* (p. 60)


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


<a id="tab-8-15"></a>
**Table 8.15 – Relationship attributes**

| Attribute Name | Description/Usage |
| --- | --- |
| **type**: string | The descriptive name of the element. |
| **direction**: RelationshipDirection {None \| Forward \| Backward \| Both} | This attribute specifies the direction of the relationship. |
| **sources**: [Element [1..*] | This association defines artifacts that are augmented by the relationship. |
| **targets**: [Element[1..*] | This association defines artifacts used to extend the semantics of the source element(s). |


In this manner you can, for example, create relationships between different artifacts that enable external annotations used for traceability, derivation, arbitrary classifications, etc. An example where the ‘reengineer’ relationship is shown between elements in a Visio TM artifact and a **BPMN**


<a id="tab-8-16"></a>
**Table 8.16 – Reengineer XML schema**

```xml
<?xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace=""
    typeLanguage="" id="a123" expressionLanguage=""
    xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL Core-Common.xsd"
    xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:src="http://www.example.org/Processes/Old"
    xmlns:tgt="http://www.example.org/Processes/New">
    <import importType="http://office.microsoft.com/visio" location="OrderConfirmationProcess.vsd"
            namespace="http://www.example.org/Processes/Old"/>
    <import importType="http://www.omg.org/spec/BPMN/20100524/MODEL"
            location="OrderConfirmationProcess.xml"
    namespace="http://www.example.org/Processes/New"/>
    <relationship type="reengineered" id="a234" direction="both">
        <documentation>An as-is and to-be relationship. The as-is model is expressed as a Visio dia-gram. The re-engineered process has been split in two and is captured in BPMN 2.0 for-mat.</documentation>
        <source ref="src:OrderConfirmation"/>
        <target ref="tgt:OrderConfirmation_PartI"/>
        <target ref="tgt:OrderConfirmation_PartII"/>
    </relationship>
</definitions>
```


<a id="sec-8-3-5"></a>
### 8.3.5 Root Element


RootElement is the abstract super class for all **BPMN** elements that are contained within Definitions. When contained within Definitions, these elements have their own defined life-cycle and are not deleted with the deletion of other elements. Examples of concrete RootElements include **Collaboration**, **Process**, and **Choreography**. Depending on their use, RootElements can be referenced by multiple other elements (i.e., they can be reused). Some RootElements MAY be contained within other elements instead of Definitions. This is done to avoid the maintenance overhead of an independent life-cycle. For example, an EventDefinition would be contained in a **Process** since it is used only there. In this case the EventDefinition would be dependent on the tool life-cycle of


The RootElement element inherits the attributes and model associations of BaseElement (see Table 8.5), but does not have any further attributes or model associations.


<a id="sec-8-3-6"></a>
### 8.3.6 Foundation Package XML Schemas


<a id="tab-8-17"></a>
**Table 8.17 – BaseElement XML schema**

```xml
<xsd:element name="baseElement" type="tBaseElement"/>
<xsd:complexType name="tBaseElement" abstract="true">
    <xsd:sequence>
        <xsd:element ref="documentation" minOccurs="0" maxOccurs="unbounded"/>
        <xsd:element ref="extensionElements" minOccurs="0" maxOccurs="1"/>
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:ID" use="optional"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
<xsd:element name="baseElementWithMixedContent" type="tBaseElementWithMixedContent"/>
<xsd:complexType name="tBaseElementWithMixedContent" abstract="true" mixed="true">
    <xsd:sequence>
        <xsd:element ref="documentation" minOccurs="0" maxOccurs="unbounded"/>
        <xsd:element ref="extensionElements" minOccurs="0" maxOccurs="1"/>
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:ID" use="optional"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
<xsd:element name="extensionElements" type="tExtensionElements"/>
<xsd:complexType name="tExtensionElements">
    <xsd:sequence>
        <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
</xsd:complexType>
<xsd:element name="documentation" type="tDocumentation"/>
<xsd:complexType name="tDocumentation" mixed="true">
    <xsd:sequence>
        <xsd:any namespace="##any" processContents="lax" minOccurs="0"/>
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:ID" use="optional"/>
    <xsd:attribute name="textFormat" type="xsd:string" default="textplain"/>
</xsd:complexType>
```


<a id="tab-8-18"></a>
**Table 8.18 – RootElement XML schema**

```xml
<xsd:element name="rootElement" type="tRootElement"/>
<xsd:complexType name="tRootElement" abstract="true">
    <xsd:complexContent>
        <xsd:extension base="tBaseElement"/>
    </xsd:complexContent>
</xsd:complexType
```


<a id="tab-8-19"></a>
**Table 8.19 – Relationship XML schema**

```xml
<xsd:element name="relationship" type="tRelationship"/>
<xsd:complexType name="tRelationship">
    <xsd:complexContent>
        <xsd:extension base="tBaseElement">
            <xsd:sequence>
                <xsd:element name="source" type="xsd:QName" minOccurs="1" maxOccurs="unbounded"/>
                <xsd:element name="target" type="xsd:QName" minOccurs="1" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attribute name="type" type="xsd:string" use="required"/>
            <xsd:attribute name="direction" type="tRelationshipDirection"/>
        </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>
<xsd:simpleType name="tRelationshipDirection">
    <xsd:restriction base="xsd:string">
        <xsd:enumeration value="None"/>
        <xsd:enumeration value="Forward"/>
        <xsd:enumeration value="Backward"/>
        <xsd:enumeration value="Both"/>
    </xsd:restriction>
</xsd:simpleType>
```

