---
title: "8.5 Services"
chapter: "8 BPMN Core Structure"
source: "OMG BPMN 2.0.2 — formal/2013-12-09"
pages: "101-105"
---

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


<a id="sec-8-5"></a>
## 8.5 Services


The Service package contains constructs necessary for modeling services, interfaces, and operations.


<a id="fig-8-36"></a>
![Figure 8.36 – The Service class diagram](../figures/fig-8-36.png)

*Figure 8.36 – The Service class diagram* (p. 102)


<a id="sec-8-5-1"></a>
### 8.5.1 Interface


An Interface defines a set of operations that are implemented by Services. The Interface inherits the attributes and model associations of BaseElement (see Table 8.5) through its relationship to RootElement. Table 8.65 presents the additional attributes and model associations of the Interface.


<a id="tab-8-65"></a>
**Table 8.65 – Interface attributes and model associations**

| Attribute Name | Description/Usage |
| --- | --- |
| **name**: string | The descriptive name of the element. |
| **operations**: Operation [1..*] | This attribute specifies operations that are defined as part of the Interface. An Interface has at least one Operation. |
| **callableElements**: CallableElement [0..*] | The CallableElements that use this Interface. |
| **implementationRef**: Element [0..1] | This attribute allows to reference a concrete artifact in the underlying implementation technology representing that interface, such as a WSDL porttype. |


<a id="sec-8-5-2"></a>
### 8.5.2 EndPoint


The actual definition of the service address is out of scope of **BPMN 2.0**. The EndPoint element is an extension point and extends from RootElement. The EndPoint element MAY be extended with endpoint reference definitions introduced in other specifications (e.g., WS-Addressing). EndPoints can be specified for *Participants*.


<a id="sec-8-5-3"></a>
### 8.5.3 Operation


An Operation defines **Messages** that are consumed and, optionally, produced when the Operation is called. It can also define zero or more errors that are returned when operation fails. The Operation inherits the attributes and model associations of BaseElement (see Table 8.5). Table 8.66 below presents the additional attributes and model associations


<a id="tab-8-66"></a>
**Table 8.66 – Operation attributes and model associations**

| Attribute Name | Description/Usage |
| --- | --- |
| **name**: string | The descriptive name of the element. |
| **inMessageRef**: Message | This attribute specifies the input **Message** of the Operation. An Operation has exactly one input **Message**. |
| **outMessageRef**: Message | This attribute specifies the output **Message** of the Operation. An Operation |
| [0..1] | has at most one input **Message**. |
| **errorRef**: Error [0..*] | This attribute specifies errors that the Operation may return. An Operation MAY refer to zero or more Error elements. |
| **implementationRef**: Element | This attribute allows to reference a concrete artifact in the underlying implemen- |
| [0..1] | tation technology representing that operation, such as a WSDL operation. |


<a id="sec-8-5-4"></a>
### 8.5.4 Service Package XML Schemas


<a id="tab-8-67"></a>
**Table 8.67 – Interface XML schema**

```xml
<xsd:element name="interface" type="tInterface" substitutionGroup="rootElement"/>
<xsd:complexType name="tInterface">
    <xsd:complexContent>
        <xsd:extension base="tRootElement">
            <xsd:sequence>
                <xsd:element ref="operation" minOccurs="1" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:string" use="required"/>
            <xsd:attribute name="implementationRef" type="xsd:QName" use="optional"/>
        </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>
```


<a id="tab-8-68"></a>
**Table 8.68 – Operation XML schema**

```xml
<xsd:element name="operation" type="tOperation"/>
<xsd:complexType name="tOperation">
    <xsd:complexContent>
        <xsd:extension base="tBaseElement">
            <xsd:sequence>
        <xsd:element name="inMessageRef" type="xsd:QName" minOccurs="1" maxOccurs="1"/>
        <xsd:element name="outMessageRef" type="xsd:QName" minOccurs="0" maxOccurs="1"/>
        <xsd:element name="errorRef" type="xsd:QName" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:string" use="required"/>
            <xsd:attribute name="implementationRef" type="xsd:QName" use="optional"/>
        </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>
```


<a id="tab-8-69"></a>
**Table 8.69 – EndPoint XML schema**

```xml
<xsd:element name="endPoint" type="tEndPoint"/>
<xsd:complexType name="tEndPoint">
    <xsd:complexContent>
        <xsd:extension base="tRootElement"/>
    </xsd:complexContent>
</xsd:complexType>
```

