SOA ML Specs
SOA ML Specs
SOA ML Specs
This OMG document replaces the submission document (ad/09-04-01 , SoaML for
UPMS, Beta). This is an OMG Adopted Specification resulting from the finalization
phase. Comments on the content of this document are welcome, and should be reported
directly through http://www.omg.org/ technology/agreement.htm, or e.mailed to
issues@omg.org by August 30th, 2009.
You may view the pending issues for this specification from the OMG revision issues
web page http://www.omg.org/issues/.
Copyright © 2008
Adaptive Ltd.
Capgemini
CSC
EDS
Fujitsu
Fundacion European Software Institute
Hewlett-Packard
International Business Machines Corporations
MEGA International
Model Driven Solutions
Rhysome
Softeam
The material in this document details an Object Management Group specification in accordance with the
terms, conditions and notices set forth below. This document does not represent a commitment to
implement any portion of this specification in any company’s products. The information contained in this
document is subject to change without notice.
LICENSES
The companies listed above have granted to the Object Management Group, Inc. (OMG) a nonexclusive,
royalty-free, paid up, worldwide license to copy and distribute this document and to modify this document
and distribute copies of the modified version. Each of the copyright holders listed above has agreed that no
person shall be deemed to have infringed the copyright in the included material of any such copyright
holder by reason of having used the specification set forth herein or having conformed any computer
software to the specification.
Subject to all of the terms and conditions below, the owners of the copyright in this specification hereby
grant you a fully-paid up, non-exclusive, nontransferable, perpetual, worldwide license (without the right to
sublicense), to use this specification to create and distribute software and special purpose specifications that
are based upon this specification, and to use, copy, and distribute this specification as provided under the
Copyright Act; provided that: (1) both the copyright notice identified above and this permission notice
appear on any copies of this specification; (2) the use of the specifications is for informational purposes and
will not be copied or posted on any network computer or broadcast in any media and will not be otherwise
resold or transferred for commercial purposes; and (3) no modifications are made to this specification. This
limited permission automatically terminates without notice if you breach any of these terms or conditions.
Upon termination, you will destroy immediately any copies of the specifications in your possession or
control.
PATENTS
The attention of adopters is directed to the possibility that compliance with or adoption of OMG
specifications may require use of an invention covered by patent rights. OMG shall not be responsible for
identifying patents for which a license may be required by any OMG specification, or for conducting legal
Any unauthorized use of this specification may violate copyright laws, trademark laws, and
communications regulations and statutes. This document contains information which is protected by
copyright. All Rights Reserved. No part of this work covered by copyright herein may be reproduced or
used in any form or by any means–graphic, electronic, or mechanical, including photocopying, recording,
taping, or information storage and retrieval systems–without permission of the copyright owner.
DISCLAIMER OF WARRANTY
The entire risk as to the quality and performance of software developed using this specification is borne by
you. This disclaimer of warranty constitutes an essential part of the license granted to you to use this
specification.
Use, duplication or disclosure by the U.S. Government is subject to the restrictions set forth in
subparagraph © (1) (ii) of The Rights in Technical Data and Computer Software Clause at DFARS
252.227-7013 or in subparagraph ©(1) and (2) of the Commercial Computer Software – Restricted Rights
clauses at 48 C.F.R. 52.227-19 or as specified in 48 C.F.R. 227-7202-2 of the DoD F.A.R. Supplement and
its successors, or as specified in 48 C.F.R. 12.212 of the Federal Acquisition Regulations and its successors,
as applicable. The specification copyright owners are as indicated above and may be contacted through the
Object Management Group, 250 First Avenue, Needham, MA 02494, U.S.A.
TRADEMARKS
The OMG Object Management Group Logo®, CORBA®, CORBA Academy®, The Information
Brokerage®, XMI® and IIOP® are registered trademarks of the Object Management Group. OMG™,
Object Management Group™, CORBA logos™, OMG Interface Definition Language (IDL)™, The
Architecture of Choice for a Changing World™, CORBAservices™, CORBAfacilities™, CORBAmed™,
CORBAnet™, Integrate 2002™, Middleware That’s Everywhere™, UML™, Unified Modeling
COMPLIANCE
The copyright holders listed above acknowledge that the Object Management Group (acting itself or
through its designees) is and shall at all times be the sole entity that may authorize developers, suppliers
and sellers of computer software to use certification marks, trademarks or other special designations to
indicate compliance with these materials.
Software developed under the terms of this license may claim compliance or conformance with this
specification if and only if the software compliance is of a nature fully matching the applicable compliance
points as stated in the specification. Software developed only partially matching the applicable compliance
points may claim only that the software was based on this specification, but may not claim compliance or
conformance with this specification. In the event that testing suites are implemented or approved by Object
Management Group, Inc., software developed using this specification may claim compliance or
conformance with the specification only if the software satisfactorily completes the testing suites
All OMG specifications are subject to continuous review and improvement. As part of this process we
encourage readers to report any ambiguities, inconsistencies, or inaccuracies they may find by completing
the Issue Reporting Form listed on the main web page http://www.omg.org , under Documents, Report a
Bug/Issue (http://www.omg.org/technology/agreement.htm).
This document is intended for architects, analysts and designers who will be specifying
service oriented solutions. It assumes a knowledge of UML2.
The type styles shown below are used in this document to distinguish programming
statements from ordinary English. However, these conventions are not used in tables or
section headings where no distinction is necessary.
Times/Times New Roman - 10 pt.: Standard body text
Helvetica/Arial - 10 pt. Bold: SoaML metaclasses, stereotypes and other syntax
elements.
Courier - 10 pt. Bold: Programming language elements.
Helvetica/Arial - 10 pt: Exceptions
Note – Terms that appear in italics are defined in the glossary. Italic text also represents
the name of a document, specification, or other publication.
Issues
The reader is encouraged to report any technical or editing issues/problems with this
specification to http://www.omg.org/ technology/agreement.htm.
OMG
Founded in 1989, the Object Management Group, Inc. (OMG) is an open membership,
not-for-profit computer industry standards consortium that produces and maintains
computer industry specifications for interoperable, portable and reusable enterprise
applications in distributed, heterogeneous environments. Membership includes
Information Technology vendors, end users, government agencies, and academia.
OMG member companies write, adopt, and maintain its specifications following a
mature, open process. OMG's specifications implement the Model Driven Architecture®
(MDA®), maximizing ROI through a full-lifecycle approach to enterprise integration that
covers multiple operating systems, programming languages, middleware and networking
infrastructures, and software development environments. OMG's specifications include:
UML® (Unified Modeling Language™); CORBA® (Common Object Request Broker
Architecture); CWM™ (Common Warehouse Metamodel); and industry-specific
standards for dozens of vertical markets.
More information on the OMG is available at http://www.omg.org/
OMG Specifications
As noted, OMG specifications address middleware, modeling, and vertical domain
frameworks. A catalog of all OMG Specifications Catalog is available from the OMG
website at http://www.omg.org/technology/documents/spec_catalog.htm
Specifications within the Catalog are organized by the following categories:
OMG Modeling Specifications
• UML
• MOF
• XMI
• CWM
• Profile specifications.
OMG Middleware Specifications
• CORBA/IIOP
• IDL/Language Mappings
• Specialized CORBA specifications
• CORBA Component Model (CCM).
Platform Specific Model and Interface Specifications
• CORBAservices
• CORBAfacilities
• OMG Domain specifications
• OMG Embedded Intelligence specifications
• SoaML P2 (Metamodel compliant, basic) - This level provides the SoaML meta
model as an extension to the core UML abstract syntax contained in the UML L3
package and adds the capabilities provided by the SoaML Services package
(Figure 1).
• SoaML:P3 (Metamodel compliant, with BMM) - This level extends the SoaML
provided in P2 and adds in integration with the OMG Business Motivation Model
(BMM) (Figure 2).
6 Additional Information
How to Read this Specification
The rest of this document contains the technical content of this specification. As
background for this specification, readers are encouraged to first have some general
background on service oriented architectures and on UML. See for instance the SOA
reference models referred to in Annex B, and the OMG UML specifications. For UML
read the UML: Superstructure specification that this specification extends. Part I,
“Introduction” of UML: Superstructure explains the language architecture structure and
the formal approach used for its specification. Afterwards the reader may choose to either
explore the InfrastructureLibrary, described in Part II, “Infrastructure Library”, or the
Classes::Kernel package which reuses it, described in Chapter 1, “Classes”. The former
specifies the flexible metamodel library that is reused by the latter; the latter defines the
basic constructs used to define the UML metamodel.
Although the chapters are organized in a logical manner and can be read sequentially, this
is a reference specification is intended to be read in a non-sequential manner.
Consequently, extensive cross-references are provided to facilitate browsing and search.
Acknowledgements
The following companies submitted and/or supported parts of this specification:
Submitters
• Adaptive
• Capgemini
• CSC
• EDS
• Fujitsu
• Fundacion European Software Institute
• Hewlett-Packard
• International Business Machines
• MEGA International
• Model Driven Solutions
• Rhysome
• Softeam
SOA, then, is an architectural paradigm for defining how people, organizations and
systems provide and use services to achieve results. SoaML as described in this
specification provides a standard way to architect and model SOA solutions using the
Unified Modeling Language® (UML®). The profile uses the built-in extension
mechanisms of MOF and UML to define SOA concepts in terms of existing UML
concepts. SoaML can be used with current “off the shelf” UML tools but some tools may
offer enhanced modeling capabilities.
1
“Model Driven Architecture”, “MDA”. “CORBA”, “Unified Modeling Language”, “UML” and “OMG”
are registered trademarks of the Object Management Group, Inc.
SoaML supports different approaches to SOA which results in different but overlapping
profile elements. Before addressing the differences, let’s review some of the similarities
and terminology.
The fundamental differences between the contract and interface based approaches
is whether the interaction between participants are defined separately from the
participants in a ServiceContract which defines the obligations of all the
participants, or individually on each participants’ service and request.
The above interface fully defines the service. It could, of course, optionally be used in a
ServiceInterface or ServiceContract – but this is not required.
The above diagram shows the use of “Shipment status” as the type of a «Service» port
and «Request» port. When used in the «Service» port the interface is provided. When
used in the «Request» port the service is used and the resulting ports are compatible.
A ServiceInterface is a UML Class and defines specific roles each participant plays in the
service interaction. These roles have a name and an interface type. The interface of the
provider (which must be the type of one of the parts in the class) is realized (provided) by
the ServiceInterface class. The interface of the consumer (if any) must be used by the
class. This example demonstrates such a service interface:
The service choreography, above, is a behavior owned by the service interface and
defines the required and optional interactions between the provider and consumer. There
are two primary interaction sets – the quote request resulting in a quote and the order
resulting in an order confirmation. In this case these interactions can be defined using
signals, which makes this service interface asynchronous and document oriented, a
mainstream SOA best practice.
Just as we want to define the services provided by a participant using a service port, we
want to define what services a participant needs or consumes. A Participant expresses
their needs by making a request for services from some other Participant. A request is
defined using a port stereotyped as a «Request» port.
The ServiceInterface is used to type «Service» ports and «Request» ports of participants.
The provider of the service uses a «Service» port and the consumer of the service uses a
«Request» port. The «Service» ports and «Request» ports are the points of interaction for
the service. Let’s look at some participants:
Note that both the dealer and manufacturer have a port typed with the “Place order
service”. The manufacture is the provider of the place order service and has a «Service»
port. The dealer is a consumer of the place order service and uses a «Request» port.
Note that the manufacturer’s port provides the “Order Taker” interface and requires the
“Order Placer” interface.
Since the dealer uses a «Request» the “conjugate” interfaces are used – so the dealer’s
port provides the Order Placer interfaces and uses the Order Taker. Since they are
Showing the type and interfaces is a bit overkill, so we usually only show the port type on
diagrams – but the full UML notation should help to clarify how ports are used to provide
and consume services. Note that these participants have other ports, showing that it is
common for a participant to be the provider and consumer of many services.
Figure 9: Example community services architecture with participant roles and services
The requirements for entities playing the roles in a ServiceContract are defined by
Interfaces or ServiceInterfaces used as the type of the role. The ServiceInterface
specifies the provided and required interfaces that define all of the operations or signal
receptions needed for the role it types – these will be every obligation, asset or piece of
data that the entity can send or receive as part of that service contract. Providing and
using corresponding UML interfaces in this way “connects the dots” between the service
contract and the requirements for any participant playing a role in that service as provider
or consumer. Note that some “SOA Smart” UML tools might add functionality to help
“connect the dots” between service contracts, service architectures and the supporting
UML classes.
It should also be noted here that it is the expectation of SoaML that services may have
bi-directional interactions or communications between the participating roles – from
provider to consumer and consumer to provider and that these communications may be
long-lived and asynchronous. The simpler concept of a request-response function call or
invocation of an “Object Oriented” Operation is a degenerate case of a service, and can
be expressed easily by just using a UML operation and a CallOperationAction. In
addition, enterprise level services may be composed from simpler services. These
compound services may then be delegated in whole or in part to the internal business
process, technology components and participants.
Participants can engage in a variety of contracts. What connects participants to particular
service contract is the use of a role in the context of a ServicesArchitecture. Each time a
ServiceContract is used in a ServicesArchitecture; there must also be a compliant port on
a participant – possibly designated as a Service or Request. This is where the participant
actually offers or uses the service.
One of the important capabilities of SOA is that it can work “in the large” where
independent entities are interacting across the Internet to internal departments and
processes. This suggests that there is a way to decompose a ServicesArchitecture and
A service contract is represented as a UML Collaboration and defines specific roles each
participant plays in the service contract. These roles have a name, an interface type that
may be stereotyped as the «Provider» or «Consumer». The consumer is expected to start
the service, calling on the provider to provide something of value to the consumer.
The interaction diagram, above, illustrates the choreography of a service contract. The
subject of this service contract is placing orders, which may optionally include a
quotation. There are two primary interaction sets – the quote request resulting in a quote
and the order resulting in an order confirmation. In this case these interactions can be
defined using signals, which makes this service contract asynchronous and document
oriented, a mainstream SOA best practice.
The interaction diagram in Figure 14 is part of the place order service contract
collaboration. This collaboration binds the parts of the service contract together. The
parts include the interaction diagram; describing the roles of the service and the interfaces
that define what operations and signal receptions may be received by the participants
playing each role. Let’s look at each part individually:
• «ServiceContract»Place Order Service – this is the service contract itself –
defining the terms and conditions under which the service can be enacted and the
results of the service. The service contract may be related to business goals or
requirements. The service contract can also be used in services architectures to
show how multiple services and participants work together for a business purpose.
• provider : Order Taker – this defines the role of the provider in the place order
service. The provider is the participant that provides something of value to the
consumer. The type of the provider role is “Order Taker”, this is the interface that
a provider will implement on a port to provide this service – note this also could
be a «ServiceInterface».
• consumer: Order Placer – this is the role of the consumer in the place order
service. The consumer is the participant that has some need and requests a service
of a provider. The type of the consumer role is “Order Placer”, this is the
interface that a consumer will implement on a port to consume this service (note
that in some cases this interface may be empty, indicating a one-way service).
• «Provider» Order Taker – this is the type of a place order service provider
indicating all the operations and signals a providing participant may receive when
enacting this service. Note that the order taker uses the order placer (the dashed
line from the order taker to the order placer) – this shows that the order taker calls
the order placer (using signals or operations). In any bi-directional service the
provider will respond to the consumers requests using the order placer interface.
Note that both the dealer and manufacturer have a “Place order service” port, each typed
by one of the interfaces in the place order service, above. Since the manufacturer’s place
order service port has the “Order taker” type, it provides this interface. Since that
interface requires the use of “Order Placer”, the manufacturer’s port requires that
interface. These interfaces are described by the “Place order service” behavior and so
must abide by that choreography when offering that service.
Likewise the “Dealer” has a “Place order service” port, but this time typed by the
interface representing their role in the service – “Order Placer”. The dealer’s port then
provides the order placer interface and requires the order taker. These ports have
“conjugate” provided and required interfaces and are therefore compatible and these ports
can be connected to enact the service.
Showing the port name, type and interfaces is a bit overkill, so we usually only show the
port type on diagrams – but the full UML notation, above, should help to clarify how
ports are used to provide and consume services. Note that these participants have other
The service contract is a binding contract with respect to the participants. By using the
interfaces of a service contract (order placer and order taker in this example) the
participants are bound to that contract when interacting via that port. The interfaces
represent the type of each bound party. This is an extension to the UML concept of a
collaboration which is not binding without an explicit collaboration use.
Note that in the above diagram the type of the dealer’s place order service port is “~Order
Taker” – this is the order taker interface, the same as is used in the manufacturer’s port.
The tilde (“~”) indicates that this is the conjugate type. Since the conjugated type has
been used (as indicated by the Request stereotype) the interfaces that are provided and
required by a port are exactly the same.
The use of the consumer’s interface or Request yields exactly the same result – it is the
modeler’s option which way to use the service contract. For service contracts with more
than two participants the Request method does not work as well.
This shows a service starting with a deposit made by the purchaser to an escrow agent.
At a later time a delivery is made and either accepted or a grievance is sent to the escrow
agent who forwards it to the seller. The seller may file a justification. This process
repeats until the escrow agent concludes the transaction and either makes the escrow
payment to the seller (in the case where delivery was made) or refunds it to the buyer (if
delivery was not made).
This is a multi-party contract because the purchaser also interacts with the seller. This is a mediator pattern
where except for delivery; the interaction between the purchaser and seller is mediated through the escrow
agent.
As with the binary service contract, each participant provides their interface and uses the
interfaces of each party they call – which is shown in terms of the interaction diagram as
well as the dependencies between the interfaces. The choreography defines the rules for
who calls who and when.
The figure, above, shows such an adapter pattern. The internal “SAP Accounting”
module provides a (fictional) SAP interface where as the SAP AR Component complies
with the enterprise service contract. The SAP adapter performs any required change in
data, protocol or process.
Note that the simple interface is used as the provider, the consumer’s role type may be
empty and the consumer will use a Request. Adding a ServiceContract for a simple
interface is then equivalent to the ServiceContract defined with one interface, above – the
only difference being a top-down vs. bottom up approach to get to the same result. The
consumer side of this service would use a «Request» port.
The above services architecture shows how the dealer, manufacturer and shipper work
together using the place order service, the shipping request service and the ship status
service. The participants defined are compatible with this architecture since they have
ports that provide and use the corresponding interfaces.
Once the components are defined a composite structure is used is show how
implementations of these components (Such as SAP….) form a composite service
oriented application.
Capability
ServiceArchitectures and ServiceContracts provide a formal way of identifying the roles
played by parties or Participants, their responsibilities, and how they are intended to
interact in order to meet some objective using services. This is very useful in a “needs” or
assembly context. However, when re-architecting existing applications for services or
building services from scratch, even the abstract Participants may not yet known. In
these situations it is also useful to express a services architecture in terms of the logical
capabilities of the services in a “Participant agnostic” way. Even though service
consumers should not be concerned with how a service is implemented, it is important to
be able to specify the behavior of a service or capability that will realize or implement a
ServiceInterface. This is done within SoaML using Capabilities.
Capabilities represent an abstraction of the ability to affect change.
«Capability»
Order Processing
«use» «use»
«Capability» «Capability»
Inv entory Management Inv oicing
«Capability» «Capability»
Scheduling Shipping
«use»
«ServiceInterface» «Capability»
ShippingServ ice Shipping
+ requestShipping() + requestShipping()
Capabilities can, in turn be realized by a Participant. When that Capability itself realizes
a ServiceInterface, that ServiceInterface will normally be the type of a Service on the
Participant as shown in Figure 13.
«use»
«ServiceInterface» «Capability»
ShippingServ ice Shipping
+ requestShipping() + requestShipping()
The ServiceInterface
types the ServicePoint
«Participant»
Shipper
ScheduleProcessing shippingOffice :
ShippingService
Shipping
<<ServicePoint>>
Capabilities may also be used to specify the parts of Participants, the capabilities the
participant has to actually provide its services. Figure 14 shows the Productions
Participant with two parts typed by Capabilities. The productionOffice Service delegates
requests to the scheduler part that is typed by the Scheduling Capability. This would
normally indicate that the Scheduling Capability realizes the SchedulingService
ServiceInterface.
«Capability»
scheduler :
Scheduling «delegate» <<ServicePoint>>
productionOffice :
SchedulingService
«Capability»
manufacturer :
Manufacturing
ServiceInterfaces may also expose Capabilities. This is done within SoaML with the
Expose Dependency. While this can be used as essentially just the inverse of a
Realization between a Capability and a ServiceInterface it realizes, it can also be used to
represent a means of identifying candidate services or a more general notion of
“providing access” to a general capability of a Participant. Figure 15 provides an
example of such a situation.
«Expose»
«Participant»
Manufacturer
Type
Sales :Orders
Figure 25: The Orders ServiceInterface exposing the Sales and Marketing Capability
Each Capability may have owned behaviors that are methods of its provided Operations.
These methods would be used to specify how the Capabilities might be implemented, and
to identify other needed Capabilities.
Alternatively, ServiceInterfaces may simply expose Capabilities of a Participant.
Business Motivation
Services are intended to facilitate the agile development of business relevant solutions.
To do so, services provide functional capabilities that when implemented and used to
provide some real-world effect that has value to potential producers and consumers.
Business requirements can be captured using the OMG Business Motivation Model
(BMM). BMM can be used to capture the influencers that motivate the business to
change, the desired ends it wishes to achieve, and their supporting means. The ends may
be defined by a business vision amplified by a set of goals and objectives representing
some desired result. The means are the courses of action that when carried out support
achievement of the ends producing the desired result as measured and verified by some
assessment of the potential impact on the business. Courses of action may represent or be
carried out by interactions between consumers with needs and providers with capabilities.
Any UML BehavioredClassifier including (for example a ServicesContract) may realize a
BMM MotivationElement through a MotivationRealization. This allows services models
to be connected to the business motivation and strategy linking the services to the things
that make them business relevant.
Stereotype Descriptions
7.1.2 Agent
An Agent is a classification of autonomous entities that can adapt to and interact with
their environment. It describes a set of agent instances that have features, constraints, and
semantics in common. Agents in SoaML are also participants, providing and using
services.
Generalizes
• Participant
Description
In general, agents can be software agents, hardware agents, firmware agents, robotic
agents, human agents, and so on. While software developers naturally think of IT systems
as being constructed of only software agents, a combination of agent mechanisms might
in fact be used from shop-floor manufacturing to warfare systems. 2
These properties are mainly covered by a set of core aspects each focusing on different
viewpoints of an agent system. Even if these aspects do not directly appear in the SoaML
metamodel, we can relate them to SoaML-related concepts. Each aspect of an agent may
be expressed as a services architecture.
Depending on the viewpoint of an agent system, various aspects are prominent. Even if
these aspects do not directly appear in the SoaML metamodel, we can relate them to
SoaML-related concepts.
• Agent aspect – describes single autonomous entities and the capabilities each can
possess to solve tasks within an agent system. In SoaML, the stereotype Agent
describes a set of agent instances that provides particular service capabilities.
• Collaboration aspect – describes how single autonomous entities collaborate
within the multiagent systems (MAS) and how complex organizational structures
can be defined. In SoaML, a ServicesArchtiecture describes how aspects of agents
interact for a purpose. Collaboration can involve situations such as cooperation
and competition.
• Role aspect – covers feasible specializations and how they could be related to
each role type. In SoaML, the concept of a role is especially used in the context of
2
For a further history and description of agents, see:
http://eprints.ecs.soton.ac.uk/825/05/html/chap3.htm,
http://en.wikipedia.org/wiki/Software_agent,
http://www.sce.carleton.ca/netmanage/docs/AgentsOverview/ao.html.
Attributes
No additional attributes.
Associations
No additional associations.
Constraints
The property isActive must always be true.
Semantics
The purpose of an Agent to specify a classification of autonomous entities (agent
instances) that can adapt to and interact with their environment, and to specify the
features, constraints, and semantics that characterize those agent instances.
Agents deployed for IT systems generally should have the following three important
properties:
• Autonomous - is capable acting without direct external intervention. Agents have
some degree of control over their internal state and can act based on their own
experiences. They can also possess their own set of internal responsibilities and
processing that enable them to act without any external choreography. As such,
they can act in reactive and proactive ways. When an agent acts on behalf of (or
as a proxy for) some person or thing, its autonomy is expected to embody the
goals and policies of the entity that it represents. In UML terms, agents can have
classifier behavior that governs the lifecycle of the agent.
Notation
An Agent can be designated using the Component or Class/Classifier notation including
the «Agent» keyword or the Agent icon decoration in the classifier name compartment.
Additions to UML2
Agent is a new stereotype in SoaML extending UML2 Component with new capabilities.
Extends Metaclass
• Property
Description
An Attachment denotes some component of a messages which is an attachment to it (as
opposed to a direct part of the message itself). In general this is not likely to be used
greatly in higher level design activities, but for many processes attached data is important
to differentiate from embedded message data. For example, a catalog service may return
general product details as a part of the structured message but images as attachments to
the message; this also allows us to denote that the encoding of the images is binary (as
opposed to the textual encoding of the main message). Attachments may be used to
indicate part of service data that can be separately accessed, reducing the data sent
between consumers and providers unless it is needed.
Attributes
• encoding: String [0..1] Denotes the platform encoding mechanism to use in
generating the schema for the message; examples might
be SOAP-RPC, Doc-Literal, ASN.1, etc.
• mimeType: String [0..1] Denotes the iana MIME media type for the Attachment
See: http://www.iana.org/assignments/media-types/.
Associations
No additional associations
Constraints
No additional constraints
Semantics
In an SOA supporting some business, documents may represent legally binding artifacts
defining obligations between an enterprise and its partners and clients. These documents
must be defined in a first class way such that they are separable from the base message
and have their own identity. The can be defined using a UML2 DataType or a
MessageType. But sometimes it is necessary to treat the document as a possibly large,
independent document that is exchanged as part of a message, and perhaps interchanged
separately. A real-world example would be all of those advertisements that fall out of
your telephone statement – they are attached to the message (in the same envelope) but
not part of the statement.
An Attachment extends Property to distinguish attachments owned by a MessageType
from other ownedAttributes. The ownedAttributes of a MessageType must be either
Notation
Attachments use the usual UML2 notation for DataType with the addition of an
«Attachment» stereotype.
Examples
Figure 33 shows an InvoiceContent Attachment to the Invoice MessageType. This
attachment contains the detailed information about the Invoice.
Additions to UML2
Extends UML2 to distinguish message attachments from other message proprieties.
7.1.4 Capability
A Capability is the ability to act and produce an outcome that achieves a result. It can.
Specify a general capability of a participant as well as the specific ability to provide a
service.
Extends Metaclass
• Class
Description
A Capability models the ability to act and produce an outcome that achieves a result that
may provide a service specified by a ServiceContract or ServiceInterface irrespective of
the Participant that might provide that service. A ServiceContract, alone, has no
dependencies or expectation of how the capability is realized – thereby separating the
concerns of “what” vs. “how”. The Capability may specify dependencies or internal
process to detail how that capability is provided including dependencies on other
Capabilities. Capabilities are shown in context using a service dependencies diagram.
Associations
No additional Associations.
Constraints
No additional constraints.
Semantics
A Capability is the ability to act and produce an outcome that achieves a result. This
element allows for the specification of capabilities and services without regard for the
how a particular service might be implemented and subsequently offered to consumers by
a Participant. It allows architects to analyze how services are related and how they might
be combined to form some larger capability prior to allocation to a particular Participant.
A Capability identifies or specifies a cohesive set of functions or capabilities that a
service provided by one or more participants might offer. Capabilities are used to
identify needed services, and to organize them into catalogues in order to communicate
the needs and capabilities of a service area, whether that be business or technology
focused, prior to allocating those services to particular Participants. For example, service
capabilities could be organized into UML Packages to describe capabilities in some
business competency or functional area. Capabilities can have usage dependencies with
other Capabilities to show how these capabilities are related. Capabilities can realize
ServiceInterface and so specify how those ServiceInterfaces are supported by a
Participant. Capabilities can also be organized into architectural layers to support
separation of concern within the resulting service architecture.
Each capability may have owned behaviors that are methods of its provided Operations.
These methods would be used to specify how the service capabilities might be
implemented, and to identify other needed service capabilities. Figure 21 depicts the
Capabilities that have been identified as needed for processing purchase orders.
Notation
A Capability is denoted using a Class or Component with the «Capability» keyword or
Capability icon decoration: .
Examples
For examples of Capability, see from Figure 21 to Figure 25.
Additions to UML2
Capability is a new stereotype used to describe service capabilities.
Extends Metaclass
• Interface (in the case of a non composite service contract)
• Class (in the case of a composite service contract)
Description
A «Consumer» models the interface provided by the consumer of a service. The
consumer of the service receives the results of the service interaction. The consumer will
normally be the one that initiates the service interaction. Consumer interfaces are used in
as the type of a «ServiceContract» and are bound by the terms and conditions of that
service contract.
The «Consumer» is intended to be used as the port type of a participant that uses a
service.
Attributes
No additional attributes.
Associations
No additional Associations.
Constraints
The «Consumer» is bound by the constraints and behavior of the ServiceContract of
which it is a type.
Semantics
The concept of a provider and a consumer is central to the concept of a service oriented
architecture. The consumer requests a service of the provider who then uses their
capabilities to fulfill the service request and ultimately deliver value to the consumer.
The interaction between the provider and consumer is governed by a «ServiceContract»
where both parties are (directly or indirectly) bound by that contract.
The consumer interface and therefore the consumer role combine to fully define a service
from the perspective of the consumer.
The consumer interface represents the operations and signals (if any) that the consumer
will receive during the service interaction.
The Consumer will also have a uses dependency on the provider interface, representing
the fact that the consumer must call the provider.
Examples
The above diagram shows a consumer interface used as the type of a consumer role in a
service contract. This consumer interface is then the type of a port on a participant that
consumes this service.
The above diagram shows the consumer as the type of a participant’s port where the
service is consumed.
Extends Metaclass
• Collaboration
Description
A Collaboration, ServiceContract or ServicesArchitecture represents a pattern of
interaction between roles. This interaction may be informal and loosly defined as in a
requirements sketch. Or it may represent formal agreements or requirements that must be
fulfilled exactly. A Collaboration’s isStrict property establishes the default value of the
isStrict property for any CollaborationUse typed by the Collaboration.
Note that as a ServiceContract is binding on the ServiceInterfaces named in that contract,
a CollaborationUse is not required if the types are compatible.
Attributes
Associations
No new associations.
Constraints
No new constraints.
Semantics
A Collaboration is a description of a pattern of interaction between roles responsible for
providing operations whose use can be described by ownedBehaviors of the
Collaboration. It is a description of possible structure and behavior that may be played by
other parts of the model.
A Collaboration may have isStrict=true indicating the collaboration represents a formal
interaction between its roles that all parts playing those roles are intended to follow. If
isStrict=false, then the collaboration represent and informal pattern of interaction that
may be used to document the intended interaction between parts without specifically
requiring parts bound to roles in CollaborationUses typed by the collaboration to be
compatible. The isStrict property of a Collaboration establishes the default value for the
isStrict property of all CollaborationUses typed by the Collaboration. A CollaborationUse
may have this value changed to address particular situations.
7.1.7 CollaborationUse
CollaborationUse is extended to indicate whether the role to part bindings are strictly
enforced or loose.
Extends Metaclass
• CollaborationUse
Description
A CollaborationUse explicitly indicates the ability of an owning Classifier to fulfill a
ServiceContract or adhere to a ServicesArchitecture. A Classifier may contain any
number of CollaborationUses which indicate what it fulfills. The CollaborationUse has
roleBindings that indicate what role each part in the owning Classifier plays. If the
CollaborationUse is strict, then the parts must be compatible with the roles they are
bound to, and the owning Classifier must have behaviors that are behaviorally compatible
with the ownedBehavior of the CollaborationUse’s Collaboration type.
Note that as a ServiceContract is binding on the ServiceInterfaces named in that contract,
a CollaborationUse is not required if the types are compatible.
Attributes
• isStrict: Boolean Indicates whether this particular fulfillment is intended
to be strict. A value of true indicates the roleBindings in
the Fulfillment must be to compatible parts. A value of
false indicates the modeler warrants the part is capable
of playing the role even through the type may not be
compatible. The default value is the value of the isStrict
property of Collaboration used as the type of the
CollaborationUse.
Associations
No new associations.
Constraints
No new constraints.
Semantics
A CollaborationUse is a statement about the ability of a containing Classifier to provide
or use capabilities, have structure, or behave in a manner consistent with that expressed in
its Collaboration type. It is an assertion about the structure and behavior of the containing
classifier and the suitability of its parts to play roles for a specific purpose.
Notation
No new notation.
Examples
The examples in section ServiceContracts describe a ServiceContract and a
ServicesArchitecture. A ServiceContract is a contract describing the requirements for a
specific service. A ServicesArchitecture is a Contract describing the requirements for the
choreography of a collection of services or Participants.
Figure 34 shows a ShipingService ServiceInterface that fulfills the ShippingContract
collaboration. The ShippingService contains a CollaborationUse that binds the parts
representing the consumers and providers of the ServiceInterface to the roles they play in
the ServiceContract Collaboration. The shipping part is bound to the shipping role and
the orderer part is bound to the orderer role. These parts must be compatible with the
roles they play. In this case they clearly are since the parts and roles have the same type.
In general these types may be different as the parts will often play roles in more than one
contract, or may have capabilities beyond what the roles call for. This allows
ServiceInterfaces to be defined that account for anticipated variability in order to be more
reusable. It also allows ServiceInterfaces to evolve to support more capabilities while
fulfilling the same ServiceContracts.
The ShippingService ServiceInterface does not have to have exactly the same behavior as
the ServiceContract collaboration it is fulfilling, the behaviors only need to be
compatible.
Figure 35 shows a Participant that assembles and connects a number of other Participants
in order to adhere to the Manufacturer Architecture ServicesArchitecture. In this case, the
roles in the ServicesArchitecture are typed by either ServiceInterfaces or Participants and
the architecture specifies the expected interaction between those Participants in order to
accomplish some desired result.
Additions to UML2
CollaborationUse extends UML2 CollaborationUse to include the isStrict property.
7.1.8 Expose[GBE2]
An Expose dependency is use to indicate a Capability exposed through a
ServiceInterface. The source of the Expose is the ServiceInterface, the target is the
exposed Capability.
Extends Metaclass
• Dependency
Description
The Expose dependency provides the ability to indicate what Capabilities that are
required by or are provided by a participant should be exposed through a Service
Interface.
Attributes
No additional attributes.
Associations
No additional associations.
Semantics
A Capability represents something a Participant needs to have or be able to do in order to
support a value proposition or achieve its goals, or something a Participant has that
enables it to carry out its provided services. Capabilities may be used to identify services
that are needed or to describe the operations that must be provided by one or more
services. An Expose dependency is a relationship between a Service Interface and a
Capability it exposes or that provides it. . This means that the exposing Service Interface
provides operations and information consistent with the capabilities it exposes. This is not
the same as realization. The Service Interface is not required to have the same operations
and properties as the capabilities it exposes. It is possible that services supported by
capabilities could be refactored to address commonality and variability across a number
of exposed capabilities, or to address other SOA concerns not accounted for in the
capabilities.
Alternatively, Capabilities may realize ServiceInterfaces using standard UML
Realization. This approach is somewhat different in that it says that the Service Interface
is a “specification” and the Capability “implements” this specification. As with the
Expose dependency, the Capability is not required to have the same operations or
properties as the Service Interface it realizes.
A Participant may have parts typed by Capabilities that indicate what the participant is
able to do. Such a Participant may also Realize a set of Capabilities through its
ownedBehaviors or through delegation to parts in its internal structure, or through
delegation to requests for services from others. These capabilities may also be exposed by
ServiceInterfaces used to specify the type of service ports through which the capabilities
are accessed.
Notation
An Expose is denoted as a UML2 Dependency with the «Expose» stereotype.
Additions to UML2
Extends Dependency to formalize the notion that a Capability can be exposed by a
ServiceInterface.
7.1.9 MessageType
The specification of information exchanged between service consumers and providers.
Extends Metaclass
• DataType
• Class
• Signal
Attributes
• encoding: String [0..1] Specifies the encoding of the message payload.
Associations
No additional associations
Constraints
[1] MessageType cannot contain ownedOperations.
[2] MessageType cannot contain ownedBehaviors.
[3] All ownedAttributes must be Public.
Notation
A MessageType is denoted as a UML2 DataType with the «MessageType» keyword.
MessageTypes can have associations with other message and data types as shown by the
relationship between POMessage and Customer – such associations must be
aggregations.
Figure 37 shows two examples of the Purchasing Interface it its processPurchaseOrder
Operation. The first example uses document or message style parameters where the types
of the parameters are the MessageTypes shown above. The second version uses more
“Object Oriented” Remote Procedure Call (RPC) style which supports multiple inputs,
outputs and a return value. The choice to use depends on modeler preference and possibly
the target platform. Some platforms such as Web Services and WSDL require message
style parameters, which can be created from either modeling style. It is possible to
translate RPC style to message parameters in the transform, and that’s what WSDL
wrapped doc-literal message style is for. But this can result in many WSDL messages
containing the same information that could cause interoperability problems in the runtime
platform.
The relationship between MessageTypes and the entity classifiers that act as their data
sources is established by the semantics of the service itself. How the service parameters
get their data from domain entities, and how those domain entities are updated based on
changes in the parameter data is the responsibility of the service implementation.
Additions to UML2
Formalizes the notion of object used to represent pure data and message content
packaging in UML2 recognizing the importance of distribution in the analysis and design
of solutions.
7.1.10 Milestone
A Milestone is a means for depicting progress in behaviors in order to analyze liveness.
Milestones are particularly useful for behaviors that are long lasting or even infinite.
Extends Metaclass
• Comment
Description
A Milestone depicts progress by defining a signal that is sent to an abstract observer. The
signal contains an integer value that intuitively represents the amount of progress that has
been achieved when passing a point attached to this Milestone.
Provided that a SoaML specification is available it is possible to analyze a service
behavior (a Participant or a ServiceContract) to determine properties of the progress
Attributes
• progress: Integer The progress measurement.
Associations
• signal: Signal [0..1] A Signal associated with this Milestone
• value: Expression [*] Arguments of the signal when the Milestone is reached.
Constraints
No new constraints.
Semantics
A Milestone can be understood as a “mythical” Signal. A mythical Signal is a conceptual
signal that is sent from the behavior every time a point connected to the Milestone is
passed during execution. The signal is sent to a conceptual observer outside the system
that is able to record the origin of the signal, the signal itself and its progress value.
The signal is mythical in the sense that the sending of such signals may be omitted in
implemented systems as they do not contribute to the functionality of the behavior. They
may, however, be implemented if there is a need for run-time monitoring of the progress
of the behavior.
Notation
A Milestone may be designated by a Comment with a «Milestone» keyword. The
expression for the signal value is the signal name followed by the expression for the
signal value in parenthesis.
«Milestone»
Order <1>
«Milestone»
Order <0>
In Figure 38 we have taken the ordering behavior from Figure 12 and added Milestones
to show the difference in worth between the alternatives. A seller that plays the role of
order processor and only rejects order will be less worth than a seller that can be shown to
provide the shipping schedule. The latter will reach the progress value 1 while the former
will only be able to reach progress value 0. In both cases the signal Order will be sent to
the virtual observer.
Additions to UML2
Distinguishes that this is a concept that adds nothing to the functional semantics of the
behavior, and may as such be ignored by implementations.
7.1.11 Participant
A participant is the type of a provider and/or consumer of services. In the business
domain a participant may be a person, organization or system. In the systems domain a
participant may be a system, application or component.
Extends Metaclass
• Class
Description
A Participant represents some (possibly concrete) party or component that provides
and/or consumes services – participants may represent people, organizations or systems
that provide and/or use services. A Participant is a service provider if it offers a service.
A Participant is a service consumer if it uses a service – a participant may provide or
consume any number of services. Service consumer and provider are roles Participants
play: the role of providers in some services and consumers in others, depending on the
capabilities they provide and the needs they have to carry out their capabilities. Since
Attributes
No additional attributes.
Associations
Constraints
[1] A Participant cannot realize or use Interfaces directly; it must do so through service
ports, which may be Service or Request.
[2] Note that the technology implementation of a component implementing a participant
is not bound by the above rule in the case of it’s internal technology implementation,
the connections to a participant components “container” and other implementation
components may or may not use services.
Semantics
A Participant is an Agent, Person, Organization, Organizational Unit or Component that
provides and/or consumes services through its service ports. It represents a component
that (if not a specification or abstract) can be instantiated in some execution environment
or organization and connected to other participants through ServiceChannels in order to
provide its services. Participants may be organizations or individuals (at the business
level) or system components or agents (at the I.T. level).
A Participant implements each of its provided service operations. Provided services may
be implemented either through delegation to its parts representing capabilities or
resources required to perform the service or other participants having the required
capabilities and resources, through requests for services from others, through the methods
of the service operations provided by its owned behaviors, or through actions that
respond to received events. The implementation of the service must be consistent with the
operations, protocols and constraints of specified by the ServiceInterface.
UML2 provides three possible ways a Participant may implement a service operation:
1. Method: A provided service operation may be the specification of an
ownedBehavior of the Participant. The ownedBehavior is the method of the
Notation
A Participant may be designated by a «Participant» stereotype or the Participant icon
decoration: . Specification Participants will have both the «Participant» and
«specification» stereotypes.
Examples
Figure 39 shows an OrderProcessor Participant which provides the purchasing Service.
This service provides the Purchasing Interface which has a single capability modeled as
the processPurchaseOrder Operation. The OrderProcessor Participant also has Requests
for invoicing, scheduling and shipping. Participant OrderProcessor provides a method
Figure 40: The Shipper specification and the ShipperImpl realization Participants
Additions to UML2
Participant is a stereotype of UML2 Class or component with the ability to have services
and requests.
Request ports are introduced to make more explicit the distinction between consumed
needs and provided capabilities, and to allow the same ServiceInterface to type both. This
avoids the need to create additional classes to flip the realization and usage dependencies
in order to create compatible types for the ports at the each end of a connector. It also
avoids having to introduce the notion of conjugate types.
7.1.12 Port
Extends UML Port with a means to indicate whether a Connection is required on this Port
or not
Extends Metaclass
• Port
Attributes
• connectorRequired: Boolean [0..1] = true Indicates whether a connector is
required on this Port or not. The default
value is true.
Associations
No additional Associations.
Constraints
No additional constraints.
Semantics
Participants may provide many Services and have many Requests. A Participant may be
able to function without all of its Services being used, and it may be able to function,
perhaps with reduced qualities of service, without a services connected to all of its
Requests. The property connectorRequired set to true on a Port indicates the Port must be
connected to at least one Connector. This is used to indicate a Service port that must be
used, or a Request port that must be satisfied. A Port with connectorRequired set to false
indicates that no connection is required; the containing Component can function without
interacting with another Component through that Port.
More generally, when connectorRequired is set to true, then all instances of this Port
must have a Connector or ServiceChannel connected. This is the default situation, and is
the same as UML. If connectorRequired is set to false, then this is an indication that the
containing classifier is able to function, perhaps with different qualities of service, or
using a different implement, without any Connector connected to the part.
Port::isService is a convention supported by UML that recognizes upward, client-facing
services a component might have as distinguished from downward services or requests
that are used for implementation purposes and are not intended to be of interest to
perspective clients. It is used to distinguish ports that the consumers are expected to be
interested in from those that are public, but are mostly concerned with the
implementation of the component through interaction with lower-level service providers.
All these ports are either service or request ports, but isService is intended to distinguish
those that would be involved in a client-facing value chain, and not something that is
about the implementation of the participant or something provided for the detailed
implementation of some other participant.
Notation
No additional Notation.
7.1.13 Property
The Property stereotype augments the standard UML Property with the ability to be
distinguished as an identifying property meaning the property can be used to distinguish
instances of the containing Classifier. This is also known as a “primary key”. In the
context of SoaML the ID is used to distinguish the correlation identifier in a message.
Extends Metaclass
• Property
Description
A property is a structural feature. It relates an instance of the class to a value or collection
of values of the type of the feature. A property may be designated as an identifier
property, a property that can be used to distinguish or identify instances of the containing
classifier in distributed systems.
Attributes
• isID: Boolean [0..1] = false Indicates the property contributes to the
identification of instances of the
containing classifier.
Associations
No additional associations.
Constraints
No additional constraints
Semantics
Instances of classes in UML have unique identity. How this identity is established, and in
what context is not specified. Identity is often supported by an execution environment in
which new instances are constructed and provided with a system-supplied identity such
as a memory address. In distributed environments, identity is much more difficult to
manage in an automated, predictable, efficient way. The same issue occurs when an
instance of a Classifier must be persisted as some data source such as a table in a
relational database. The identity of the Classifier must be maintained in the data source
and restored when the instance is reactivated in some execution environment. The
instance must be able to maintain its identity regardless of the execution environment in
which it is activated. This identity is often used to maintain relationships between
instances, and to identify targets for operation invocations and events.
Notation
An identifying property can be denoted using the usual property notation {isID=true} or
using the stereotype «Id» on a property which indicates isID=true.
Examples
Figure 36 show an example of both data and message types with identifying properties.
Figure 42 shows an example of a typical Entity/Relationship/Attribute (ERA) domain
model for Customer Relationship Management (CRM). These entities represent possibly
persistent entities in the domain, and may be used to implement CRM services such as
processing purchase orders. The id properties in these entities could for example be used
to create primary and foreign keys for tables used to persist these entities as relational
data sources.
Additions to UML2
Adds the isID property from MOF2 in order to facilitate identification of classifier
instances in a distributed environment.
Extends Metaclass
• Interface (in the case of a non composite service contract)
• Class (in the case of a composite service contract)
Description
A «Provider» models the interface provided by the provider of a service. The provider of
the service delivers the results of the service interaction. The provider will normally be
the one that responds to the service interaction. Provider interfaces are used in as the type
of a «ServiceContract» and are bound by the terms and conditions of that service
contract.
The «Provider» interface is intended to be used as the port type of a participant that
provides a service.
Attributes
No additional attributes.
Associations
No additional Associations.
Constraints
The «Provider» interface is bound by the constraints and behavior of the ServiceContract
of which it is a type.
Semantics
The concept of a provider and a consumer is central to the concept of a service oriented
architecture. The consumer requests a service of the provider who then uses their
capabilities to fulfill the service request and ultimately deliver value to the consumer.
The interaction between the provider and consumer is governed by a «ServiceContract»
where both parties are (directly or indirectly) bound by that contract.
The provider interface and therefore the provider role combine to fully define a service
from the perspective of the provider.
The provider interface represents the operations and signals that the provider will receive
during the service interaction.
The Provider may also have a uses dependency on the consumer interface, representing
the fact that the provider may call the consumer as part of a bi-directional interaction.
These are also knows as “callbacks” in many technologies.
Examples
The above diagram shows a provider interface used as the type of a provider role in a
service contract. This consumer interface is then the type of a port on a participant that
provides this service.
The above diagram shows the provider as the type of a participant’s port where the
service is provided.
Extends Metaclass
• Port
Description
A Request extends Port to specify a feature of a Participant that represents a service the
Participant needs and consumes from other participants. The request is defined by a
ServiceInterface. It is used by the Participant either through delegation from its parts or
through actions in its methods. The request may be connected to a business
MotivationalElement to indicate the intended goals the Participant wishes to achieve.
There may be constraints associated with the request that define its nonfunctional
characteristics or expected qualities of service. This information may be used by potential
providers to determine if their service meets the participant’s needs.
A Request may include the specification of the value required from another, and the
request to obtain value from another. A Request is the visible point at which consumer
requests are connected to service providers, and through which they interact in order to
produce some real world effect.
A Request may also be viewed as some need or set of related needs required by a
consumer Participant and provided by some provider Participants that has some value, or
achieves some objective of the connected parties. A Request is distinguished from a
simple used Operation in that it may involve a conversation between the parties as
specified by some communication protocol that is necessary to meet the needs.
Request extends UML2 Port and changes how provided and required interfaces are
interpreted by setting the ports isConjugated property to true. The capabilities consumed
through the Request – its required interfaces – are derived from the interfaces realized by
the service's ServiceInterface. The capabilities provided by a consumer in order to use the
service – its provided interfaces -- are derived from the interfaces used by the service's
ServiceInterface. These are the opposite of the provided and required interfaces of a Port
or Service and indicate the use of a Service rather than the provision of a service. Since
the provided and required interfaces are reversed, a request is the use of the service
interface – or logically the conjugate type of the provider.
Distinguishing requests and services allows the same ServiceInterface to be used to type
both the consumer and provider ports. Any Request can connect to any Service as long as
Attributes
No new attributes.
Associations
No new associations
Constraints
[1] The type of a Request must be a ServiceInterface or an Interface
[2] The isConjugated property of a «Request» must be set to true
Semantics
A Request represents an interaction point through which a consuming participant with
needs interacts with a provider participant having compatible capabilities.
A Request is typed by an Interface or ServiceInterface which completely characterizes
specific needs of the owning Participant. This includes required interfaces which
designate the needs of the Participant through this Request, and the provided interfaces
which represent what the Participant is willing and able to do in order to use the required
capabilities. It also includes any protocols the consuming Participant is able to follow in
the use of the capabilities through the Request.
If the type of a «Request» is a ServiceInterface, then the Request's provided Interfaces are
the Interfaces used by the ServiceInterface while it’s required Interfaces are those
realized by the ServiceInterface. If the type of a «Request» is a simple Interface, then the
required interface is that Interface and the provided interfaces are those interfaces used be
the simple interface, in any.
Notation
A Request may be designated by a Port with either a «RequestPoint» keyword and/or the
Request icon decoration: .
Examples
Figure 43 shows an example of an OrderProcessor Participant which has a purchasing
Service and three Requests: invoicing, scheduling and shipping that are required to
implement this service. The implementation of the purchasing Service uses the
capabilities provided through Services that will be connected to these Requests.
Additions to UML2
None. «Request» uses the new isConjugated feature of UML Port.
7.1.16 ServiceChannel
A communication path between Services and Requests within an architecture..
Extends Metaclass
• Connector
Description
A ServiceChannel provides a communication path between consumer Requests and
provider services.
Attributes
No new attributes.
Associations
No new associations.
Semantics
A ServiceChannel is used to connect Requests of consumer Participants to Services of
provider Participants at the ServiceChannel ends. A ServiceChannel enables
communication between the Request and service.
A Request specifies a Participant’s needs. A Service specifies a Participant’s services
offered. The type of a Request or Service is a ServiceInterface or Interface that defines
the needs and capabilities accessed by a Request through Service, and the protocols for
using them. Loosely coupled systems imply that services should be designed with little or
no knowledge about particular consumers. Consumers may have a very different view of
what to do with a service based on what they are trying to accomplish. For example, a
guitar can make a pretty effective paddle if that’s all you have and you’re stuck up a
creek without one.
Loose coupling allows reuse in different contexts, reduces the effect of change, and is the
key enabler of agile solutions through an SOA. In services models, ServiceChannels
connect consumers and providers and therefore define the coupling in the system. They
isolate the dependencies between consuming and providing participants to particular
Request/service interaction points. However, for services to be used properly, and for
Requests to be fully satisfied, Requests must be connected to compatible Services. This
does not mean the Request Port and Service Port must have the same type, or that their
ServiceInterfaces must be derived from some agreed upon ServiceContract as this could
create additional coupling between the consumer and provider. Such coupling would for
example make it more difficult for a service to evolve to meet needs of other consumers,
to satisfy different contracts, or to support different versions of the same request without
changing the service it is connected to.
Loosely coupled systems therefore require flexible compatibility across ServiceChannels.
Compatibility can be established using UML2 specialization/generalization or realization
rules. However, specialization/generalization, and to a lesser extent realization, are often
impractical in environments where the classifiers are not all owned by the same
organization. Both specialization and realization represent significant coupling between
subclasses and realizing classifiers. If a superclass or realized class changes, then all the
subclasses also automatically change while realizing classes must be examined to see if
change is needed. This may be very undesirable if the subclasses are owned by another
organization that is not in a position to synchronize its changes with the providers of
other classifiers.
A Request is compatible with, and may be connected to a Service though a
ServiceChannel if:
Notation
A ServiceChannel uses the same notation as a UML2 Connector and may be shown using
the «ServiceChannel» keyword.
Examples
Figure 44 illustrates a Manufacturer service Participant that assembles a number of other
Participants necessary to actually implement a service as a deployable runtime solution.
Manufacturer provides a purchaser service that it delegates to the purchasing service of
its orderProcessor part. ServiceChannels connect the Requests to the Services the
OrderProcessor needs in order to execute.
Additions to UML2
ServiceChannel extends UML2 Connector with more specific semantics for service and
request compatibility.
7.1.17 ServiceContract
A ServiceContract is the formalization of a binding exchange of information, goods, or
obligations between parties defining a service.
Extends Metaclass
• Collaboration
Description
A ServiceContract is the specification of the agreement between providers and consumers
of a service as to what information, products, assets, value and obligations will flow
between the providers and consumers of that service – it specifies the service without
regard for realization, capabilities or implementation. A ServiceContract does not require
the specification of who, how or why any party will fulfill their obligations under that
ServiceContract, thus providing for the loose coupling of the SOA paradigm. In most
cases a ServiceContract will specify two roles (provider and consumer) – but other
service roles may be specified as well. The ServiceContract may also own a behavior
that specifies the sequencing of the exchanges between the parties as well as the resulting
state and delivery of the capability. The owned behavior is the choreography of the
Attributes
No new attributes.
Associations
No new associations.
Constraints
If the CollaborationUse for a ServiceInterface in a services architecture has isStrict=true
(the default), then the parts must be compatible with the roles they are bound to. For parts
to be compatible with a role, one of the following must be true:
1. The role and part have the same type,
2. The part has a type that specializes the type of the role,
3. The part has a type that realizes the type of the role, or
4. The part has a type that contains at least the ownedAttributes and
ownedOperations of the role. In general this is a special case of item 3 where the
part has an Interface type that realizes another Interface.
5. The type of each role in a service contract shall have a uses dependency to the
type of all roles that role is connected to.
Examples
In the context of services modeling, ServiceContracts may be used to model the
specification for a specific service. A ServicesArchitecture or ParticipantArchitecture
may then be used to model the requirements for a collection of participants that provide
and consume services defined with service contracts.
When modeling the requirements for a particular service, a ServiceContract captures an
agreement between the roles played by consumers and providers of the service, their
capabilities and needs, and the rules for how the consumers and providers must interact.
The roles in a ServiceContract are typed by Interfaces that specify Operations and events
which comprise the choreographed interactions of the services.. A ServiceInterface may
fulfill zero or more ServiceContracts to indicate the requirements it fulfills but they are
usually one-one.
Figure 45 is an example of a ServiceContract. The orderer and order processor participate
in the contract.
The service contract diagram shows a high level “business view” of services but includes
ServiceInterfaces as the types of the roles to ground the business view in the required
details. While two roles are shown in the example, a ServiceContract may have any
number of roles. Identification of the roles may then be augmented with a behavior.
Real-world services are typically long-running, bi-directional and asynchronous. This
real-world behavior shows the information and resources that are transferred between the
service provider and consumer.
The above behavior (a UML interaction diagram) shows when and what information is
transferred between the parties in the service. In this case a fulfillPurchaseOrder message
is sent from the orderer to the order processor and the order processor eventually
responds with a shipment schedule of an order rejected.
The service interfaces that correspond to the above types are:
Note that the above interfaces are the types of the roles in the ServiceContract shown in
Figure 47.
The following example illustrates compound services:
Real-world services are often complex and made up of simpler services as “building
blocks”. Using services as building blocks is a good design pattern in that it can decouple
finer grain serves and make them reusable across a number of service contracts. Finer
grain services may then be delegated to internal actors or components for
implementation. Above is an example of a compound ServiceContract composed of
other, nested, ServiceContracts. This pattern is common when defining enterprise level
ServicesArchitectures – which tend to be more complex and span an extended process
lifecycle. The purchasing ServiceContract is composed of 2 more granular
ServiceContracts: the “Ordering Service” and the “Invoicing Service”. The buyer is the
“orderer” of the ordering service and the “invoice receiver” of the invoicing service. The
“Seller” is the “Order processor” of the ordering service and the “invoicer” of the
invoicing service. ServiceContracts may be nested to any level using this pattern. The
purchasing service defines a new ServiceContract by piecing together these other two
services. Note that it is common in a compound service for one role to initiate a sub
service but then to be the client of the next – there is no expectation that all the services
must go the same direction. This allows for long-lived, rich and asynchronous
interactions between participants in a service.
Note: A compound ServiceContract should not be confused with a service that is
implemented by calling other services, such as may be specified with a Participant
ServicesArchitecture and/or implemented with BPEL. A compound
ServiceContract defines a more granular ServiceContract based on other
ServiceContracts.
A compound service has service interfaces with ports, each port representing its role in
the larger service contract. The above example shows the Service Interfaces
corresponding to the buyer and seller in the purchasing service, a compound service.
Note that the seller has two ports, each corresponding to the roles played in the ordering
service and invoicing service. Likewise, the buyer has two ports corresponding to the
roles it plays in the same services. These ports are typed by the Service Interfaces of the
corresponding nested services. The purchasing service specifies how these classes work
together and defines the behavioral specification required for each.
When a compound service is used it looks no different than any other service in a
services architecture, thus hiding the detail of the more granular service in the high-level
architecture yet providing traceability through all levels.
Notation
A ServiceContract is designated using the Collaboration notation stereotyped with
«ServiceContract» or using the ServiceContract icon decoration: .
Additions to UML2
ServiceContract is a UML collaboration extended as a binding agreement between the
parties, designed explicitly to show a service as a contract that is independent of but
binding on the involved parties.
Extends Metaclass
• Class
Description
A ServiceInterface defines the interface and responsibilities of a participant to provide or
consume a service. It is used as the type of a Service or Request Port. A ServiceInterface
is the means for specifying how a participant is to interact to provide or consume a
Service. A ServiceInterface may include specific protocols, commands and information
exchange by which actions are initiated and the result of the real world effects are made
available as specified through the functionality portion of a service. A ServiceInterface
may address the concepts associated with ownership, ownership domains, actions
communicated between legal peers, trust, business transactions, authority, delegation, etc.
A Service port or Request port or role may be typed by either a ServiceInterface or a
simple UML2 Interface. In the latter case, there is no protocol associated with the
Service. Consumers simply invoke the operations of the Interface. A ServiceInterface
may also specify various protocols for using the functional capabilities defined by the
servicer interface. This provides reusable protocol definitions in different Participants
providing or consuming the same Service.
A ServiceInterface may specify “parts” and “owned behaviors” to further define the
responsibilities of participants in the service. The parts of a ServiceInterface are typed by
the Interfaces realized (provided) and used (required) by the ServiceInterface and
represent the potential consumers and providers of the functional capabilities defined in
those interfaces. The owned behaviors of the ServiceInterface specify how the functional
capabilities are to be used by consumers and implemented by providers. A
ServiceInterface therefore represents a formal agreement between consumer Requests and
providers that may be used to match needs and capabilities.
A service interface may it self have service ports or request ports that define more
granular services that serve to make up a larger composite service. This allows
“enterprise scale” services to be composed from multiple, smaller services between the
same parties. Internal to a participant connections can be made for the entire service or
any one of the sub-services, allowing delegation of responsibility for specific parts of the
service contract.
One or more ServiceInterfaces may also be combined in a ServiceContract which can
further specify and constrain related services provided and consumed by Participants.
Attributes
No new attributes.
Associations
No new associations.
Constraints
[1] All parts of a ServiceInterface must be typed by the Interfaces realized or used by the
ServiceInterface.
Semantics
A ServiceInterface defines a semantic interface to a Service or Request. That is, it defines
both the structural and behavioral semantics of the service necessary for consumers to
determine if a service typed by a ServiceInterface meets their needs, and for consumers
and providers to determine what to do to carry out the service. A ServiceInterface defines
the information shown in Table 1.
Function Metadata
An indication of what the service does or is The ServiceInterface name
about
The service defined by the ServiceInterface The provided Interfaces containing
that will be provided by any Participant Operations modeling the capabilities.
having a Service typed by the
ServiceInterface, or used by a Participant As in UML2, provided interfaces are
having a Request typed by the designated using an InterfaceRealization
ServiceInterface between the ServiceInterface and other
Interfaces.
Any service interaction consumers are Required Interfaces containing Operations
expected to provide or consume in order to modeling the needs.
use or interact with a Service typed by this
ServiceInterface As in UML2, required interfaces are
designated using a Usage between the
ServiceInterface and other Interfaces.
The detailed specification of an interaction Each atomic interaction of a
providing value as a service including: ServiceInterface is modeled as an
1. Its name, often a verb phrase Operation or event reception in its provided
or required Interfaces.
indicating what it does
2. Any required or optional service From UML2, an Operation has Parameters
data inputs and outputs defining its inputs and outputs,
3. Any preconditions consumers are preconditions and post-conditions, and may
expected to meet before using the raise Exceptions. Operation Parameters
Notation
Denoted using a «ServiceInterface» on a Class or Interface.
Examples
Figure 50 shows an example of a simple Interface that can be used to type a Service or
Request. This is a common case where there is no required interface and no protocol.
Using an Interface as type for a Service port or Request port is similar to using a WSDL
PortType or Java interface as the type of an SCA component’s service or reference.
A ServiceInterface may have more than two parts indicating a connector between the
consuming and providing ports may have more than two ends, or there may be more than
one connection between the ports as specified for UML2. Usually services will be binary,
involving just to parties. However, ServiceInterfaces may use more than two parts to
provide more flexible allocation of work between consumers but such services may be
better specified with a ServiceContract.
Figure 52 shows another version of the ShippingService ServiceInterface that has three
parts instead of two. A new part has been introduced representing the scheduler. The
orderer part is not typed in the example because it provides no capabilities in the service
interface. The protocol indicates that the orderer does not necessarily have to process the
schedule; a separate participant can be used instead. This allows the work involved in the
ShippingService to be divided among a number of participants.
Additions to UML2
Defines the use of a Class or Interface to define the type of a Request or Service port.
7.1.19 Service
A Service represents a feature of a Participant that is the offer of a service by one
participant to others using well defined terms, conditions and interfaces. A Service
designates a Port that defines the connection point through which a Participant offers its
capabilities and provides a service to clients.
Description
A Service extends Port to specify a feature of a Participant that represents a service the
Participant provides and offers for consumption by other participants. The service is
defined by a ServiceInterface. It is implemented by the Participant either through
delegation to its parts or through its methods. The service may be connected to a business
MotivationalElement to indicate its intended value proposition. There may be constraints
associated with the service that define its nonfunctional characteristics or warranted
qualities of service. This information may be used by potential consumers to determine if
the service meets their needs.
A Service may include the specification of the value offered to another, and the offer to
provide value to another. A Service is the visible point at which consumer requests are
connected to providers and through which they interact in order to produce some real
world effect.
A Service may also be viewed as the offer of some service or set of related services
provided by a provider Participant that, when consumed by some consumer Participants,
has some value or achieves some objective of the connected parties. A service is
distinguished from a simple Operation in that it may involve a conversation between the
parties as specified by some communication protocol that is necessary to meet the
common objective.
The capabilities provided through the Service – its provided interfaces – are derived
from the interfaces realized by the Service's ServiceInterface and further detained in the
service contract. The capabilities required of consumers in order to use the Service -- its
required interfaces – are derived from the interfaces used by the Service's
ServiceInterface. These are the same as the provided and required interfaces of the Port
that is extended by Service.
Change the Semantics section of Service from:
A Service represents an interaction point through which a providing Participant with
capabilities to provide a service interacts with a consuming participant having compatible
needs. It represents a part at the end of a ServiceChannel connection and the point
through which a provider satisfies a request.
A Service is typed by an Interface or ServiceInterface that, possibly together with a
ServiceContract, completely characterizes specific capabilities of the producing and
consuming participants’ responsibilities with respect to that service. This includes
provided interfaces which designate the capabilities of the Participant through this
Service, and the required interfaces which represent what the Participant is requires of
consumers in order to use the provided capabilities. It also includes any protocols the
providing Participant requires consumers to follow in the use of the capabilities of the
Service.
If the type of a Service is a ServiceInterface, then the Service's provided Interfaces are the
Interfaces realized by the ServiceInterface while it’s required Interfaces are those used by
Attributes
No new attributes.
Associations
No New associations.
Constraints
[1] The type of a Service must be a ServiceInterface or an Interface
[2] The direction property of a Service must be incoming
Semantics
A Service represents a feature of a Participant through which a providing Participant with
capabilities to provide a service interacts with one or more consuming participants having
compatible needs. It represents a part at the end of a ServiceChannel connection and the
point through which a provider satisfies a request.
A Service is typed by an Interface or ServiceInterface that, possibly together with a
ServiceContract, completely characterizes specific capabilities of the producing and
consuming participants’ responsibilities with respect to that service. This includes
provided interfaces which designate the capabilities of the Participant through this
Service and the required interfaces which represent what the Participant requires of
consumers in order to use the provided capabilities. It also includes any protocols the
providing Participant requires consumers to follow in the use of the capabilities of the
Service.
If the type of a Service is a ServiceInterface, then the Service's provided Interfaces are the
Interfaces realized by the ServiceInterface while it’s required Interfaces are those used by
the ServiceInterface. If the type of a Service is a simple Interface, then the provided
interface is that Interface and there is no required Interface and no protocol. If the
ServiceInterface or UML interface typing a Service is defined as a role within a
ServiceContract, then the Service (and participant) is bound by the semantics and
constraints of that service contract.
Notation
A Service may be designated by a Port with either a «Service» keyword and/or the
Service icon decoration: .
The Invoicer Participant has two ownedBehaviors, one an Activity and the other an
OpaqueBehavior which are the methods for the Operations provided through the
invoicing service and model the implementation of those capabilities – no stereotypes are
provided as these are standard UML constructs..
Figure 56 shows an example of a scheduling Service provided by a Scheduling
Participant. In this case, the type of the Service is a simple Interface indicating what
capabilities are provided through the Service, and that consumers are not required to
provide any capabilities and there is no protocol for using the service capabilities. SoaML
allows Services type typed by a simple interface in order to support this common case.
Productions also has ownedBehaviors which are the methods of its provided service
operations.
Additions to UML2
None. Service is a stereotype of UML Port to designate a feature of a Participant.
7.1.20 ServicesArchitecture
The high-level view of a Service Oriented Architecture that defines how a set of
participants works together, forming a community, for some purpose by providing and
using services.
Extends Metaclass
• Collaboration
Description
A ServicesArchitecture (a SOA) describes how participants work together for a purpose
by providing and using services expressed as service contracts. By expressing the use of
services, the ServicesArchitecture implies some degree of knowledge of the dependencies
between the participants in some context. Each use of a service in a ServicesArchitecture
is represented by the use of a ServiceContract bound to the roles of participants in that
architecture.
Note that use of a ServicesArchitecture is optional but is recommended to show a high
level view of how a set of Participants work together for some purpose. Where as simple
services may not have any dependencies or links to a business process, enterprise services
can often only be understood in context. The services architecture provides that
context—and may also contain a behavior—which is the business process. The
Attributes
No new attributes.
Associations
No new associations.
Constraints
[1] The parts of a ServicesArchitecture must be typed by a Participant or capability. Each
participant satisfying roles in a ServicesArchitecture shall have a port for each role
binding attached to that participant. This port shall have a type compliant with the
type of the role used in the ServiceContract.
Semantics
Standard UML2 Collaboration semantics are augmented with the requirement that each
participant used in a services architecture must have a port compliant with the
ServiceContracts the participant provides or uses, which is modeled as a role binding to
the use of a service contract.
Examples
The diagram in Figure 58 depicts an abbreviated service contract with the participant
types and their ports (the red dependencies are illustrative and show the type of the roles).
Note that the participants each have a port corresponding to the services they participate
in.
Notation
Class Descriptions
8.1.1 Catalog
Provides a means of classifying and organizing elements by categories for any purpose.
Extends
• Package
Specializes
• NoteDescriptor
Description
A named collection of related elements, including other catalogs characterized by a
specific set of categories. Applying a Category to an Element using a Categorization
places that Element in the Catalog.
Catalog is a RAS DescriptorGroup containing other Catalogs and/or Categories providing
the mapping to RAS classification.
Attributes
No additional attributes.
Associations
No additional associations
Constraints
[1] Catalogs can only contain Categories, CategoryValues or other Catalogs.
Notation
The notation is a Package stereotyped as «Catalog». Tool vendors are encouraged to
provide views and queries that show elements organized in catalog hierarchies based on
how they are categorized.
8.1.2 Categorization
Used to categorize an Element by a Category or CategoryValue
Extends
• Dependency
Description
Categorization connects an Element to a Category or CategoryValue in order to
categorize or classify that element. The Element then becomes a member of the Catalog
that contains that Category. This allows Elements to be organized in many hierarchical
Catalogs where each Catalog is described by a set of Categories.
The source is any Element, the target is a Category or CategoryValue.
Attributes
No additional attributes.
Associations
No additional associations.
Semantics
The primary purpose of Category is to be able to provide information that characterizes
an element by some domain of interest. Categorizing an element characterizes that
element with that Category. What this means is derived from the meaning of the
Category. The meaning of a Category is defined by its name, owned attributes, or
constraints if any.
Categorization of an element may be used to provide multiple orthogonal ways of
organizing elements. UML currently provides a single mechanism for organizing model
elements as PackagedElements in a Package. This is useful for namespace management
and any other situations where it is necessary for an element to be in one and only one
container at a time. But it is insufficient for organization across many different
dimensions since a PackageableElement can only be contained in one Package. For
example, model elements might also need to be organized by owner, location, cost
gradient, time of production, status, portfolio, architectural layer, Web, tiers in an n-tiered
application, physical boundary, service partitions, etc. Different classification hierarchies
and Categories may be used to capture these concerns and be applied to elements to
indicate orthogonal organizational strategies.
Notation
A Category or CategoryValue may be applied to an Element Categoization which may be
represented as a Dependency with the «Categorization» stereotype.
8.1.3 Category
A classification or division used to characterize the elements of a catalog and to
categorize model elements.
Description
A Category is a piece of information about an element. A Category has a name indicating
what the information is about, and a set of attributes and constraints that characterize the
Category. An Element may have many Categories, and the same Category can be applied
to many Elements. Categories may be organized into Catalogs hierarchies.
Attributes
No additional attributes.
Associations
No additional associations
Constraints
[1] A Category must be contained in a Catalog.
Semantics
The meaning of a Category is not specified by SoaML. Instead it may be interpreted by
the modeler, viewer of the model, or any other user for any purpose they wish. For
example a Catalog hiearachy of Categories could be used to indicate shared
characteristics used to group species. In this case the categorization might imply
inheritance and the principle of common descent. Other categorizations could represent
some other taxonomy such as ownership. In this case, the term categorization is intended
to mean describing the characteristics of something, not necessarily an inheritance
hierarchy. All instances having categorized by a Category have the characteristics of that
Category.
The characteristics of a Category are described by its attributes and constraints.
ClassifierValues may be used to provide specific values for these attributes in order to
more specifically categorize an element.
A Category may have ownedRules representing Constraints that further characterize the
category. The meaning of these constraints when an element is categorized by a Category
is not specified.
Notation
The notation is an Artifact stereotyped as «Category».
Examples
Ownership
8.1.4 CategoryValue
Provides specific values for a Category to further categorize model elements.
Generalizations
• FreeFormValue
Attributes
No additional attributes.
Associations
No additional associations
Constraints
[1] The classifier for a CategoryValue must be a Category
Semantics
The characteristics of a Category are described by its attributes and constraints.
ClassifierValues may be used to provide specific values for these attributes in order to
more specifically categorize an element.
Categorizing an element with a CategoryValue categorizes the element by the Category
that is the classifier of the CategoryValue.
Notation
The notation is an InstanceSpecification stereotyped as «CategoryValue».
Abstract Syntax
9.1.1 MotivationElement
Generalizations
Extensions
Description
A placeholder for BMM MotivationElement. This placeholder would be replaced by a
BMM profile or metamodel element.
9.1.2 MotivationRealization
Generalizations
• Realization
Extensions
• Realization
Attributes
• No additional attributes.
Associations
• realizedEnd: End [*] The ends realized by this
MeansRealization. (Metamodel only)
Constraints
No additional constraints.
Semantics
Notation
MotivationRealization uses the same notation as Realization in UML2. The source and
targets of the Realization indicate the kind of Realization being denoted.
Additions to UML2
No.
Examples
Figure 67 shows an example of a business motivation model that captures the following
business requirements concerning the processing of purchase orders:
• Establish a common means of processing purchase orders.
• Ensure orders are processed in a timely manner, and deliver the required goods.
• Help minimize stock on hand.
• Minimize production and shipping costs
This example of a BMM model shows the business vision, the goals that amplify that
vision, and the objectives that quantify the goals. It also shows the business mission, the
strategies that are part of the mission plan, and the tactics that implement the strategies.
Finally the strategies are tied to the goals they support.
The example also shows a Process Purchase Order contract that formalizes the
requirements into specific roles, responsibilities, and interactions. The Contract indicates
what motivation elements it realizes through MeansRealizations.
Additions to UML2
Adds a link between UML and BMM that exploits Collaboration and CollaborationUse to
provide a semantically rich way of indicating how requirements captured in a business
motivation model are realized and fulfilled by elements in a UML model.
Figure 69 presents the elements that support the ServiceContract Modeling. These
contracts can later be realized by service elements such as Participants, ServiceInterfaces
or ConnectableElements (Request or Service Ports). Another element included in this
figure is the ServiceArchitecture. The ServiceArchitecture is used to model service
architectures and their owned behaviors.
Figure 70 presents the elements that support the Data Modeling. Attachments are used to
model elements that have their own identity when they are taken out of the system. For
example we can define an attachment to send a text document that can be used with other
applications external to the system. The MessageType is used to explicitly identify data
elements that will travel among the participants of the service interaction.
A ServiceChannel provides
a communication path
between consumer
Requests (ports) and
provider services (ports).
A Services Architecture
(an SOA) describes how
participants work together
for a purpose by providing
and using services
expressed as service
The Conformance Guidelines of the OASIS Reference Model for SOA, section 4,
outlines expectations that a design for a service system using the SOA approach should
meet:
Have entities that can be identified as services as defined by this Reference Model;
• Be able to identify how visibility is established between service providers and
consumers;
This SoaML specification defines a Service metaclass, a kind of UML Port, which
establishes the interaction point between service consumers and providers. A
Service’s type is a ServiceInterface which provides all the information needed by
a consumer to use a service. However, the UPMS RFP specifies that mechanisms
for discovering existing services and descriptions consumers would use to
determine the applicability of availability of existing services for their needs
(awareness) are out of scope and are therefore not covered in this submission.
• Be able to identify how interaction is mediated;
Interaction between a service consumer and provider connected through a service
channel is mediated by the protocol specified by the service provider. The
protocol is defined by the service interface used as the type of the service and may
include a behavior that specifies the dynamic aspects of service interaction. The
interfaces realized and used by a service specification define the operations,
parameters, preconditions, post conditions (real world effect), exceptions and
other policy constraints that make up the static portion of the service specification.
• Be able to identify how the effect of using services is understood;
The effect of a service is specified by the post conditions of the provided service
operations assuming the consumer follows the policies, preconditions, and
protocols specified by the service interface.
• Have descriptions associated with services;
This submission includes a service interface for describing the means of
12.1.1 Introduction
Our example business scenario is a community of independent dealers, manufacturers
and shippers who want to be able to work together cohesively and not re-design business
processes or systems when working with other parties in the community. On the other
hand they want to be able to have their own business processes, rules and information.
The community has decided to define a service oriented architecture for the community
to enable this open and agile business environment.
Note that there is a direct correspondence between the roles and services in the business
community and the SOA defined as a SoaML community collaboration
“ServicesArchitecture”. The services architecture provides a high-level and contextual
view of the roles of the participants and services without showing excessive detail. Yet,
the detail is there—as we shall see as we drill down. Note that the detail is fully
integrated with the high-level view providing traceability from architecture through
implementation.
One additional detail that can be seen in this diagram is the roles that the participants play
with respect to each of the services. Note that the manufacturer “plays the role” of
“seller” with respect to the purchasing service and the dealer “plays the role” of the
“buyer” with respect to the same service. Note also that the manufacturer plays the
“from” role with respect to the “Ship” service. It is common for participants to play
multiple roles in multiple services within an architecture. The same participant may be
“provider” of some services and a “consumer” of other.
There are various approaches to creating the services architecture – some more “top
down” and others more “bottom up”. Regardless of the “direction” the same information
is created and integrated as the entire picture of the architecture evolves. For this reason
we will avoid implying that one part is “first”, the goals is to complete the picture –
filling in details as they are known, based on the methodology utilized.
Since a B2B architecture is among independent participants there is usually no “business
process” other than the services. However a business process may be defined for a
community if one is required, or for any of the participants – for example for a
community within an organization may have a specific process. When defining the
services architecture for a participant a business process is frequently specified.
The diagram above shows that the purchasing service is actually composed of two
simpler services: Ordering service and Invoicing Service. Of course a real enterprise
service would probably have many more sub-services. In this scenario, the “buyer” is the
“orderer” of the order processing service and the “payer” of the invoicing service. The
seller is the “order processor” of the ordering service and “invoicer” of the invoicing
service.
Looking at the “Ordering” service in more detail we will identify the roles of participants
in that service like this:
This diagram simply identifies the “Service Contract” – the terms and conditions of
“ordering” as well as defining the two roles: Orderer and Order Processor. We then want
to add some more detail – describing the flow of information (as well as products,
services and obligations) between the participants. This is done using a UML behavior
like this:
This is the “behavior” associated with the OrderingService service contract. This
behavior is then required of any participant who plays a role in these services. The
service contract is “binding” on all of the parties. The behavior shows how the
participants work together within the context of this service – not their internal processes.
The specific behavior here is how the messages are “choreographed” in the service
contract – what flows between who, when and why.
Note that the service contract behavior shows what information flows between the
participants (such as PurchaseOrder and ShipmentSchedule) and also defines when these
interactions take place. This is the “choreography” of the service contract – the
choreography defines what flows between the parties, when and under what conditions.
Rules about the services are frequently attached to the choreography as UML constraints.
This behavior is quite simple – the orderer sends a “fulfillPurchaseOrder” the ther
OrderProcessor and the orderProcessor sends back either a “shipmentSchedule” or an
“oerderRejectied”. In this diagram we don’t see the details of the message content – but
that details is within the model as the arguments to these messages.
The diagram above shows the participant services architecture of a manufacture that
complies with the community architecture. Note that the architecture of a participant is
defined for the manufacture as a “composite structure” – this is one of the new features of
UML-2. While it is a composite structure we can also see that the pattern of participants
playing roles and services being used is the same. In this case the manufacturer has
“delegated” the invoicing service and ordering service to “accounting” and “order
processing”, respectively. Accounting and Order Processing are participants – but
participants acting within the context of the Manufacturer. Since they are operating
within this context it also makes sense to define a business process for the manufacturer –
with the participants as swim lanes, like this:
Note that for brevity of the example this is just a portion of the business process – but it
shown how the information flows of the SOA can correspond to activities within a
participant.
Participants
A participant is a class that models an entity that participates in a process according to the
design laid out in the SOA. The participant has service ports that are the connection
points where the services are actually provided or consumed.
The class above is an example of a participant. Since this “Accounting” participant plays
a role in the manufacturer component, above, and plays a role with respect to two
services – it has a service port for each one of the services it plays a role in. In this case
“InvoiceReciever” as its role in the “Invoicing” service a “Notified” in its role in the
shipping service. Likewise there is a participant component “behind” each role in a
services architecture. A participant may play a role in multiple services architectures and
therefore must have ports that satisfy the requirements of each.
Service Interfaces
The service ports of the participants have a type which defines the participants
responsibilities with respect to a service – this is the “ServiceInterface”. The service
interface is the type of a role in one and only one service contract. The service contract
details the responsibilities of all of the participants- their responsibilities with respect to a
service. The service interface is the “end” of that service that is particular to a specific
participant. Each service interface has a type that realizes the interfaces required of that
type as well as using the services that must be supplied by a consumer of that service
(since many services are bi-directional).
The diagram, above, shown how the “Service Interfaces” are related both to the UML
interfaces that define the signals and operations implemented, as well as those used. This
common pattern defines a bi-directional asynchronous service. Note that the service
interfaces are the types of the roles in the service contracts. These same service
interfaces will be the types of the service ports on participants – thus defining the
contracts that each participant is required to abide by.
The diagram, above, shown the “trace” between a service architecture through the
participants and their service ports to the service contracts that defines the service
interfaces for each of the service ports. Note that the lines in red are just to show how the
underlying UML relationships are defined and are not part of the architecture.
What the above shows is that the Dealer & Manufacturer are participants in a “Dealer
Network Architecture” in which the dealer plays the role of the “buyer” in the
“PurchasingService” and the “Manufacturer” plays the role of the seller in the same
service. Participating in these services requires that they have service ports defined on
the participant type – these are the ports on “Dealer” and “Manufacturer” types. These
ports have a ServiceInterface type defined in the “Purchasing Service” contract. These
service interfaces each have two ports because Purchasing Service is a compound service
contract – the service interfaces have a port for each nested service: OrerService &
InvoicingService, respectively.
The Process Purchase Order collaboration in Figure 83 indicates there are four roles
involved in processing purchase orders. The orderProcessor role coordinates the activities
of the other roles in processing purchase orders. The types of these roles are the
Interfaces shown in Figure 84. These Interfaces have Operations which represent the
responsibilities of these roles. The Process Purchase Order Activity owned by the
collaboration indicates the rules for how these roles interact when performing their
responsibilities.
Service Identification
The next step in this example service methodology is to examine the collaboration and
identify services and participants necessary to fulfill the indicated requirements.
Eventually a service provider will be designed and implemented that is capable of playing
each role in the collaboration, and providing the services necessary to fulfill the
responsibilities of that role.
Figure 85 shows a view of the service interfaces determined necessary to fulfill the
requirements specified by the collaboration in Figure 83. This view simply identifies the
needed service interfaces, the packages in which they are defined, and the anticipated
dependencies between them.
Service Specification
The identified ServiceInterfaces must now be defined in detail. A service interface
defines an interface to a service: what consumers need to know to determine if a service’s
capabilities meet their needs and if so, how to use the service. A ServiceInterface also
defines as what providers need to know in order to implement the service.
12.1.6.1.1 Invoicing
Figure 85 identified an InvoicingService capable of calculating the initial price for a
purchase order, and then refining this price once the shipping information is known. The
total price of the order depends on where the products are produced and from where they
are shipped. The initial price calculation may be used to verify the customer has sufficient
credit or still wants to purchase the products.
Figure 86 shows a ServiceInterface that defines invoicing services. This ServiceInterface
provides the Invoicing Interface and requires the InvoiceProcessing Interface.
The protocol for the InvoicingService indicates that a consumer playing the role of an
orderer must initiate a price calculation before attempting to get the complete price
calculation. The orderer must then be prepared to respond to a request to process the final
invoice. Some consumer requesting the invoicing service could do more than these three
actions, but the sequencing of these specific actions is constrained by the protocol which
is consistent with the behavioral part of the Process Purchase Order collaboration.
12.1.6.1.3 Shipping
A shipping service provides the capability to ship goods to a customer for a filled order.
When the order is fulfilled, a shipping schedule is sent back to the client.
Now all the service interfaces have been specified the next step is to realize the services
by creating participants that provide and consume services defined by these service
interfaces.
Service Realization
Part of architecting a SOA solution is to determine what participants that will provide and
consume what services, independent of how they do so. Particular participants may then
be elaborated to show how they do so using the services of other participants or their own
business process. These consumers and providers must conform to any fulfilled
contracts as well as the protocols defined by the service interfaces they provide or
require.
Each service offered by a participant must be implemented somehow. Each function
(operation) will have a method (behavior) whose specification is the provided service
operation. The design details of the service method can be specified using any Behavior:
an Interaction, a\Activity, StateMachine, or OpaqueBehavior. Often a service
participant’s internal structure consists of an assembly of parts representing other service
providers, and the service methods will be implemented using their provided capabilities.
12.1.6.1.5 Invoicing
The Invoicer service Participant shown in Figure 90 provides an invoicing Service
defined by ServiceInterface InvoicingService. That is, the invoicing Service provides the
Invoicing interface, requires the InvoiceProcessing interface, and the design of the service
operations must be compatible with the protocol for the service interface. The invoicing
Service and can also specify the possible bindings provided by the Invoicer Participant
for use in connecting with other service participants.
The Invoicer service provider realizes the Invoicing use case (details not shown) which
provides a means of modeling its functional and nonfunctional requirements.
Figure 90 also shows the design of the implementation of the initiatePriceCalculation and
completePriceCalculation service operations. The design of the initiatePriceCalculation is
modeled as an OpaqueBehavior whose specification is the initiatePriceCalculation
operation provided by the invoicing services. The design of the completePriceCalculation
operation is also shown in Figure 90. As you can see, this design is consistent with the
ServiceInterface protocol since the processInvoice operation is invoked on the invoicing
service port after the price calculation has been completed.
12.1.6.1.7 Shipping
A Shipper specification shown in Figure 92 specifies a service provider that provides a
shipping service defined by the Shipping service port interface. This specification
component is not a provider of the shipping service. Rather it defines a specification for
how to ship goods to a customer for a filled order that can be realized by possibly many
different designs over time.
12.1.6.1.8 Purchasing
The purchase order processing services are specified by the Purchasing interface, and
provided by the OrderProcessor provider as shown in Figure 93. This participant provides
the Purchasing Service through its purchasing port.
The OrderProcessor Participant also has Requisitions to for three Services: invoicing,
scheduling and shipping. These providers of these services are used by the
OrderProcessor component in order to implement its Services.
This example uses an Activity to model the design of the provided processPurchaseOrder
service operation. The details for how this is done are shown in the internal structure of
the OrderProcessor component providing the service as shown in Figure 94.
The internal structure of the OrderProcessor component is quite simple. It consists of the
service ports for the provided and required services plus a number of other properties that
maintain the state of the service provider. The id property is used to identify instances of
this service provider. This property may be used to correlate consumer and provider
interaction at runtime. The schedule and shippingInfo properties are information used in
the design of the processPurchaseOrder service operation.
Each service operation provided by a service provider must be realized by either:
1. an ownedBehavior (Activity, Interaction, StateMachine, or OpaqueBehavior) that
is the method of the service Operation, or
2. an AcceptEventAction (for asynchronous calls) or AcceptCallAction (for
synchronous request/reply calls) in some Activity belonging to the component.
This allows a single Activity to have more than one (generally) concurrent entry
point controlling when the provider is able to respond to an event or service
invocation. These AcceptEventActions are usually used to handle callbacks for
returning information from other asynchronous CallOperationActions.
The OrderProcessor component has an example of both styles of service realization as
shown in Figure 95. The processPurchaseOrder operation is the specification of the
processPurchaseOrder Activity which is an owned behavior of OrderProcessor.
This diagram corresponds very closely to the BPMN diagram and BPEL process for the
same behavior. The InvoiceProcessing and ShippingProcessing service operations are
realized through the processInvoice and processSchedule accept event actions in the
process. The corresponding operations in the interfaces are denoted as «trigger»
operations to indicate the ability to respond to AcceptCallActions (similar to receptions
and AcceptEventActions where the trigger is a SignalEvent).
Fulfilling Requirements
The OrderProcessor component is now complete. But there are two things left to do. First
the OrderProcessor service provider needs indicate that it fulfills the requirements
specified in the collaboration shown in Figure 83. Second, a Participant must be created
that connects service providers capable of providing the OrderProcessor’s required
Assembling Services
The OrderProcessor, Invoicer, Productions and Shipper Participants are classifiers that
define the services consumed and provided by those participants and how they are used
and implemented. In order to use the providers, it is necessary to assembly instances of
them in some context, and connect the consumer requisitions to the provider services
through service channels.
The Manfacturer Participant shown in Figure 96 represents a complete component that
connects the OrderProcessor service provider with other service providers that provide its
required services.
Figure 96 also shows how the Manufacturer participant provides the purchaser service by
delegating to the purchasing service of the Order processor.
Introduction
This material provides purchase order example, which is given in the UPMS RFP
(soa/2006-09-09) to shows concept of Fujitsu SDAS/SOA. The Fujitsu SDAS/SOA
prescribes to specify class diagram, state machine and “Service Architecture” diagram for
the application. In this material, these diagrams are specified.
There are some premises for this specification.
• determine the producing factories to make delivery cost lower considering the
productivity of the factories.
• the delivery plans are determined on the morning of the delivery day, (that is,
delivery plans cannot be updated on the delivery day.) The delivery plans can be
updated till the delivery day.
• Draft cost doesn’t include the delivery cost, that is, draft cost can be calculated as
price * amount.
• An Detail_Invoice is always issued for each Purchase order slip, that is, there are
no production defects and order changes.
• Detail_Invoices are made up to an Invoice at the end of the month.
StateMachine
Based on KANAME entity model, state machine for each KANAME entity is described
and all state machines are merged into only one state machine that is allied with each
other coordinating its interaction points. Then, we can get following state machine.
purchaseOrder
Proceeded
productionSch initialPrice_
eduling_Reque Calculated
shipping_
Requested
shippingSched
ule Sent
completePrice
Each state transition is caused by each operation. Then, such each operation is defined as
required “Service”. Besides, considering roles of services, those services are grouped into
same role. Then, we can get Service Architecture diagram deploying such service.