2. Tutorial outline
• I t d ti
Introduction
– What you will learn
– Online material
• SoaML language
– Overview
– Core concepts
p
• SoaML methodology
– Business architecture modelling guidelines
– System architecture modelling guidelines
SoaML Tutorial, SSAIE 2010
2
4. What you will learn
• T d
Today
– Core concepts of the SoaML language
– SoaML modelling guidelines
• SHAPE extra material (on your own)
– Website: http://rd.softeam.com/demos/soaml
•
•
•
•
BPMN and SoaML languages
SoaML methodology guidelines
Modelio demonstration and hands-on
SHAPE language extensions for SoaML
– Flexible Business Models
– Semantic Web Services
– Multi-Agent Systems
SoaML Tutorial, SSAIE 2010
4
5. Online material
•
SHAPE project website:
–
•
SHAPE Methodology
–
•
http://rd.softeam.com/demos/soaml
http://rd softeam com/demos/soaml
Modelio Enterprise Edition v1.1.1 modelling tool (30 day evaluation)
–
•
http://www.omgwiki.org/SoaML/doku.php
SHAPE hands-on tutorial given at ECMFA 2010 (extra material)
–
•
http://www.omg.org/spec/SoaML/
SoaML wiki
–
•
http://www.shape-project.eu/download-area/SHAPE-Methodology OnlineLibrary final/index.htm
p
p p j
gy_
y_
SoaML specification
–
•
http://www.shape-project.eu/
http://modeliosoft.com
SoaML Designer and S ML E i modules f M d li
S ML D i
d SoaML Engine
d l for Modelio
–
http://rd.softeam.com/prototypes/
SoaML Tutorial, SSAIE 2010
5
7. What is SoaML?
• Service oriented architecture Modeling
Language (SoaML)
– Extensions to UML2 to support service concepts.
– Focuses on basic service modelling concepts.
– A foundation for further extensions and
integration with BPMN, BMM and other
i t
ti
ith BPMN
d th
metamodels.
SoaML Tutorial, SSAIE 2010
7
8. SoaML – History
IBM,...
Issued September
29, 2006
LOI Deadline
November 28, 2006
SHAPE,...
Fujitsu,...
Initial Submission
Deadline June 4, 2007
S1(3)
Adaptive,...
S3(1) Revised Submission
Deadline May 26, 2008
S2(2)
Revised Submission
November 19, 2007
OMG
O G Technical Meeting
June 23-27, 2008 *
Ontario Canada
B1
Revised Submission
Deadline Aug 25, 2008
SoaML FTF Feb., 2009
Voting List Deadline
August 5, 2007
OMG Technical Meeting
Dec 08-12, 2008 *
Santa Clara EEUU
S4
OMG Technical Meeting
Sept 22-26, 2008 *
Orlando EEUU
S5
Revised Submission
Deadline Nov 10, 2008
AMP, Aug. 2009
B2
SoaML FTF Nov., 2009
SoaML FTF Rec. Dec.,
2009, Los Angeles
BPMN 2 0 Dec 2009
2.0, Dec.
SoaML Tutorial, SSAIE 2010
Sx – Submission version x
Bx – Beta version x
SoaML final standard
March, 2010 (veto, by
Oct.
Oct 2010)
8
9. SoaML – Goals
•
Model Driven Architecture (MDA)
(MDA).
•
Compatibility with UML and
BPMN.
•
Intuitive and complete service
modelling in UML.
•
Direct mapping to Web services.
•
Bi-directional asynchronous
services.
•
Top-down, bottom up or meet-inthe-middle modelling.
•
Services architectures where
S i
hit t
h
parties provide and use multiple
services.
•
Design by
D i b contract or d
t t dynamic
i
adaptation of services.
•
Service capability and its contract.
y
•
No changes to UML.
•
•
Services defined to contain other
services.
Mapped to and p of a business
pp
part
process specification.
SoaML Tutorial, SSAIE 2010
9
10. SOA in Model Driven
Architecture (MDA)
Business Concerns
Business Model
Enterprise Services (e-SOA)
Goals
Roles, Collaborations & Interactions
Process & Information
Logical System Model
g
y Customers
Technology Services (t-SOA)
Costs
Software Components
Interfaces, Messages & Data
Agility
Technology Specification
Line-O
Of-Sight
Policy
P li
Refinement & Automa
&
ation
Pla
atform Platform
Computat
tion
m
Sp
pecific Independent In
ndependent
Mo
odel
M
Model
Model
MDA
Terms
JMS, JEE, Web Services
,
,
WSDL, BPEL, XML Schema
SoaML Tutorial, SSAIE 2010
10
11. SoaML – Service and SOA
•
”A service i value delivered to another through a well-defined
i is l d li
d
h
h
h
ll d fi d
interface and available to a community (which may be the
general public). A service results in work provided to one by
another. “
•
Service Oriented Architecture (SOA) is a way of describing and
understanding organizations, communities and systems to maximize
agility, scale and interoperability.
•
SOA is an architectural paradigm f d fi i h
i
hit t l
di
for defining how people,
l
organizations and systems provide and use services to achieve
results.
•
SoaML provides a standard way to architect and model SOA
solutions using the Unified Modeling Language (UML).
11
SoaML Tutorial, SSAIE 2010
12. SoaML – Capabilities
• UML extensions to support service modelling:
– identifying services
– specifying services
– d fi i service consumers and providers
defining
i
d
id
– policies for using and providing services.
– defining classification schemes
– defining service and service usage requirements and
linking them to related OMG metamodels such as the
BMM and BPMN.
SoaML Tutorial, SSAIE 2010
12
14. Marketplace Services
Example
Acme Industries
Mechanics Are Us
Manufacturer
Consu
umer
Dealer
D l
Provi
ider
Order
Conformation
Shipped
Consumer
Consumer
SoaML Tutorial, SSAIE 2010
Prov
vider
Physical
Delivery
Prov
vider
Status
GetItThere
G tItTh
Freight Shipper
Ship Req
Shipped
Delivered
14
15. Business process overview
: Dealer
Place order
: OrderHandler
r
:O rder
Receive order
Receive order confirmation
Receive shipping confirmation
:O rderC onfirmation
:ShipmentStatus
C onfirm order
[no]
Forward shipping confirmation
Receive delivery confirmation
: Shipper
Invoice customer
End event
[yes]
Inventory low?
: Productions
Ship order
Order production
Receive shipping confirmation
Initiate production
: Invoicing
: Manuf actu
urer
End event
Start event
Send invoice
:ShippingReques t
:ShipmentStatus
Ship it
Shi item
Send shipping confirmation
SoaML Tutorial, SSAIE 2010
:D eliveryC onfirmation
Send delivery confirmation
End event
15
16. Services architecture
(Community-level)
<<ServicesArchitecture>>
Dealer Network A chitect e
Deale Net o k Architecture
Place O d service
Pl
Order
i
consumer
orde r:Place O rde r
de a le r:De a le r
provider
a cm e :Ma nufacture r
consumer
Ship Status
service
Community-level
services architecture
for the Dealer Network
consumer
status:Ship Sta tus
provider
ship:Shipping R e que st
shippe r:Shippe r
provider
Shipping
Request
service
Services architecture:
• High level description of how participants work together for a purpose by
p
providing and using services expressed as service contracts.
g
g
p
• UML collaboration stereotyped «ServicesArchitecture».
SoaML Tutorial, SSAIE 2010
16
17. <<ServicesArchitecture>>
Dealer Network Architecture
consumer
orde r:Pla ce O rde r
d
Pl
d
de a le r:De a le r
acm e :Manufacture r
consumer
sta tus:Ship Status
collaboration
use
provider
role
binding
Participants
p
and service
contracts
p
provider
shippe r:Shippe r
consumer
ship:Shipping R e que st
provider
<<ServiceC ontract>>
Place Order
consum e r:O rde rPla ce r
role
binding
pro vide r:O rde rTak e r
Service contract:
• Service specifications that define
the roles each participant plays in
the service and the interfaces
they implement to play that role
role.
• UML collaboration stereotyped
«ServiceContract».
SoaML Tutorial, SSAIE 2010
type
t
<<Participant>>
Manufacturer
Participant:
p
• Represent logical or real people or
organizational units that
participate in services
architectures and/or business
processes.
• UML class stereotyped
«Participant».
17
19. <<ServicesArchitecture>>
Dealer Network Architecture
consumer
orde r:Pla ce O rde r
d
Pl
d
de a le r:De a le r
p
provider
Community and
participant
architectures
acm e :Manufacture r
consumer
consumer
sta tus:Ship Status
provider
ship:Shipping R e que st
shippe r:Shippe r
provider
<<ServicesArchitecture>>
Manufacturer Architecture
Community-level
services architecture
for th D l Network
f the Dealer N t
k
i:Invoicing
de a le r:De a le r
provider
consumer
orde r:Pla ce O rde r
consumer
provider
ic:Invoice C ustom er
oh:O rde rHandle r
Participant-level
services architecture
for the Manufacturer
consumer
ship:Shipping R e que st
provider
shippe r:Shippe r
SoaML Tutorial, SSAIE 2010
consumer
po:Production O rde r
provider
p:Productions
19
20. Service contract: Place order
(Structure)
Consumer
role within
service
contract
Service
channel
<<ServiceC ontract>>
Place Order
consum e r:O rde rPla ce r
<<interface, Consumer>>
OrderPlacer
quote ()
orde rC onfirm ation()
•
type
type
Consumer
interface
•
provide r:O rde rTa k e r
<<interface, Provider>>
OrderTaker
Provider
role within
service
contract
Provider
interface
quote R e que st()
orde r()
The service contract represents an agreement between the involved
p
g
participants for how the service is to be provided and consumed.
The agreement includes the interfaces, choreography and any other
terms and conditions.
SoaML Tutorial, SSAIE 2010
20
21. Service interface: Place order
(Structure)
Conjugate
C j
t
service interface
<<interface, Consumer>>
OrderPlacer
<<ServiceInterface>>
~PlaceOrderInterface
<<use>>
Service
interface
<<use>>
quote ()
orde rC onfirm a tion()
<<interface, Provider>>
OrderTaker
<<ServiceInterface>>
PlaceOrderInterface
quote R e que st()
orde r()
Service interface:
• Refines the service contract.
• Defines the provided and required interfaces for a service.
• A service interface is the type of a service port on a participant or
component.
– UML class stereotyped «ServiceInterface».
•
A conjugate service interface is the type of a request port on a
participant or component.
– UML class stereotyped «ServiceInterface» and the names starts with a ‘~’
yp
SoaML Tutorial, SSAIE 2010
21
22. Choreography: Place order
(Service contract behaviour)
(S
i
t
tb h i
)
(Service interface behaviour)
consum e r:O rde rPla ce r
Service choreography
can be specified using
any UML behaviour, e.g,
interaction or activity
provide r:O rde rTa k e r
opt
quote R e que st
quote
consumer : Or
rderPlacer
[]
quote
order
orderC onfirmation
provider : OrderTak
ker
orde rC onfirm a tion
SoaML Tutorial, SSAIE 2010
quoteRequest
order
22
23. Interfaces and message types:
Place order
Consumer
Provider
<<interface, Provider>>
interface, Provider
OrderTaker
<<interface, Consumer>>
interface, Consumer
OrderPlacer
<<signal>> quote R e que st(in m e ssage : Q uote R e que st)
<<signal>> orde r(in m e ssa ge : O rde r)
<<signa l>> quote (in m e ssa ge : Q uote )
<<signa l>> orde rC onfirm a tion(in m e ssage : O rde rC onfirm a tion)
<<MessageType>>
QuoteRequest
Q t R
t
EUR
USD
<<MessageType>>
Order
O d
<<MessageType>>
Quote
Q t
custom e rID : string
quote Date : da te
custom e rID : string
custom e rO rde rID : string
re que st : Q uote R e que st
price : float
custom e rO rde rID : string
provide rO rde rID : string
C o nfirm e d
Shippe d
productID : string
quantity : inte ge r
orde rDa te : da te
productID : string
curre ncy : C urre ncyType
confirm ation : C onfirm a tionType
confirm ationDate : date
C a nce lle d
O utO fStock
q
quantity : inte ge r
y
g
<<MessageType>>
OrderConfirmation
O d C fi
ti
<<enumeration>>
C urrencyType
<<enumeration>>
C onfirmationType
shipm e ntID : string
p
g
Provider:
• Specifies the interface provided by the provider of a service.
• UML interface stereotyped «Provider».
Message
type
Consumer:
• Specifies the interface provided by the consumer of a service.
• UML interface stereotyped «Consumer».
yp
Message type:
• Specifies the information exchanged between service consumers and providers.
yp
g yp
• UML class stereotyped «MessageType».
SoaML Tutorial, SSAIE 2010
23
24. Service and request ports:
Place order
<<interface, Consumer>>
OrderPlacer
<<ServiceInterface>>
~PlaceOrderInterface
Request
port
<<Participant>>
p
Dealer
<<use>>
<<ServiceInterface>>
PlaceOrderInterface
<<interface, Provider>>
OrderTaker
quo te R e que st()
orde r()
type
OrderTaker
<<use>>
quo te ()
orde rC onfirm ation()
type
OrderTaker
<<Participant>>
p
Manufacturer
<<Se rvice >> s:Place O rde rInte rface
<<R e que st>> r:~Place O rde rInte rfa ce
OrderPlacer
OrderPlacer
Service
port
Service:
• Specifies a feature of a p
p
participant that is the offer of a service by one
p
y
participant to others using well defined terms, conditions and interfaces.
• UML port stereotyped «Service» on a participant or component.
Request:
• Specifies a feature of a participant that represents a service the participant
needs and consumes from other participants.
• UML port stereotyped «Request» on a participant or component.
p
yp
q
p
p
p
SoaML Tutorial, SSAIE 2010
24
25. <<ServicesArchitecture>>
Dealer Network Architecture
consumer
orde r:Pla ce O rde r
d
Pl
d
de a le r:De a le r
p
provider
acm e :Manufacture r
consumer
consumer
sta tus:Ship Status
provider
ship:Shipping R e que st
shippe r:Shippe r
provider
Logical system
components:
Dealer Network
Architecture
OrderTaker
<<Participant>>
Dealer
<<R e que st>> r:~P la ce O rde rInte rface
R
t
i Shi St t I t f
<<R e que st>> ssi:~ShipSta tusInte rface
OrderTaker
OrderPlacer
<<Se rvice >> s:P l ce O rde rInte rfa ce
la
d
f
OrderPlacer
Shipper
<<R e que st>> sri:~ShippingR e que stInte rfa ce
<<Participant>>
Shipper
pp
Shipper
<<Se rvice >> ssi:ShipSta tusInte rface
<<Se rvice >> sri:ShippingR e que stInte rfa ce
•
<<Participant>>
Manufacturer
ShippingProvider
ShippingConsumer
ShippingProvider
ShippingConsumer
Components implement the service interfaces providing the link to
systems. Participants and services may be used in multiple
architectures.
SoaML Tutorial, SSAIE 2010
25
26. <<ServicesArchitecture>>
Manufacturer Architecture
provider
consumer
order:Pla ce O rde r
Software
components:
Manufacturer
Architecture
i:Invoicing
de ale r:De ale r
consumer
provider
ic:Invoice C ustom er
oh:O rde rHa ndle r
consumer
consumer
ship:Shipping R e quest
provider
shipper:Shippe r
po:Production O rde r
provider
p:Productions
Mapped to software components
<<Participant>>
Dealer
D l
<<R e que st>> r:~Place O rde rInte rfa ce
<<Participant>>
Manufacturer
<<Se rvice >> s:Place O rde rInte rfa ce
<<Se rvice >> s:P la ce O rde rInte rface
i:Invoicing
oh:O rde rHandle r
<<Se rvice >> ici:Invoice C ustom e rInte rfa ce
<<R e que st>> ici:~Invoice C ustom e rInte rfa ce
<<Participant>>
Shipper
<<R e que st>> poi:~ProductionO rde rInte rfa ce
<<R e que st>> sri:~ShippingR e que stInte rface
<<Se rvice >> sri:ShippingR e que stInte rfa ce
SoaML Tutorial, SSAIE 2010
p:Productions
<<Se rvice >> poi:ProductionO rde rInte rface
<<R e que st>> sri:~ShippingR e que stInte rface
26
28. CIMFlex
Business Processes, Business Data, Business Rules, Organization
SoaML Methodology
Business
Processes
Business Goals
Services
Architectures
Capabilities
Service Contracts and Choreographies
Model to Model (M2M)
System
S t
Architecture
Model
(SAM)
Interfaces
and Messages
Transformation
Service Interfaces
Modelio
• Business pe
B
erspective on SOA
o
• IT perspective on SOA
A
Business
Architecture
Model
(
(BAM)
)
Service
Choreographies
Service
Orchestrations
O h t ti
Software Components
Model to Text (M2T)
Transformation
PlatformPlatform
Cloud, Web Services, JEE, MAS, P2P/Grid, SWS
Specific
SoaML Tutorial, SSAIE 2010
Model (PSM)
CIM
PIM
PSM
Modelio
Soa L Metho olog
aML
odo gy
Flexible
Business
Model (CIM)
28
29. Business Architecture
Model (BAM)
Business
Architecture
Model
(BAM)
Business Goals
Capabilities
Business
Processes
Services
Architectures
Service Contracts and Choreographies
•
Represents the business perspective of an SOA.
•
Captures business requirements and identifies services:
– Business goals
– Business processes
– Capabilities
•
Specifies the business community and its services:
– Services architectures of the business community.
– S
Service contracts b t
i
t
t between the business entities participating i th
th b i
titi
ti i ti in the
community.
SoaML Tutorial, SSAIE 2010
29
30. Case study: Travel agency
y
g
y
(Discount Voyage)
• A Travel Agency has some
contact with Partner Agencies
which provide reservation for
Flights, Hotels, Cars, etc.
Flights Hotels Cars etc
Client
Rese
erve
Pay
Cancel
• A Client can interact with the
Travel Agency to:
Ha
ands on
Partner
Agency
Insurance P
Purchase
SoaML Tutorial, SSAIE 2010
Visa
Travel res
servation facilitie
es
• The Travel Agency needs to
be in contact with a Visa
payment center in order to be
paid by the Client, and pay the
Partner Agencies.
Payment fa
acilities
– Reserve a Travel:
– Cancel a Travel
– Pay the Travel
Travel Agency
Insurance
Company
30
31. Business
Architecture
Modelling
M d lli
Business
Architecture
Model
(BAM)
Business
Processes
Business Goals
Services
Architectures
Capabilities
Service Contracts and Choreographies
Model to Model (M2M)
System
Architecture
Model
(SAM)
Interfaces
and Messages
Transformation
Service Interfaces
Service
Choreographies
Service
Orchestrations
Software Components
Model to Text (M2T)
PlatformSpecific
Model (PSM)
SoaML Tutorial, SSAIE 2010
Transformation
Cloud, Web Services, JEE, MAS, P2P/Grid, SWS
31
32. Define
business goals
•
Business M i i M d l
B i
Motivation Model
(BMM) identifies and defines:
– factors that motivate the
business plan
– elements of a business plan
•
Financial Optimization
Identifier: 04
Scope: strategic
IsC orporate: true
Kind: Qualitative
Requested Satisfaction: hard
Unit Of Measurement: net margin rate
Goal Value: 8%
C urrent value: 3,5%
Problems: Personnel Reconversion
Source: C DC C eisar
(excerpt)
To manage the enterprise accounts by
optimizing the cash-flow and enterprise
margins.
Modelling steps:
– Identify goals
– Specify g
p
y goals and their
relationships
– Perform goal analysis linking the
goals to existing or potential new
business processes
<<part>>
<<part>>
<<part>>
Internet Access
Maximize personnel productivity
M i i
l
d ti it
C ash-flow management
<<part>>
Automation of accounting department activities
SoaML Tutorial, SSAIE 2010
32
33. Refine business processes
(1/2)
•
Identify l
Id if relevant b i
business processes:
– Focus on business processes that enable the business goals to be met.
– Public and collaborative business processes between different business
organizations.
• Map to community-level services architectures in SoaML
– Private business processes within a business organization.
• M to participant-level services architectures i S ML
Map t
ti i
tl
l
i
hit t
in SoaML.
•
Refine the business processes:
– Identify business entities and model them as pools or swimlanes
swimlanes.
• Map to participants in SoaML
– Focus on tasks that describe the interaction points between the business entities.
• Map to service contracts in SoaML
p
– Identify the control and data flows between these tasks.
• Map to message types in SoaML
SoaML Tutorial, SSAIE 2010
33
34. Refine business processes
(2/2)
Client
Case
study
example
StartEvent
c : Client
[ye s]
[cance l]
C ancel Travel
[no ]
browse travels
des tination:s tring
SelectTravel
t:T ravel
PlaceOrder
confirmInterest
C ancel?
c :C lient
Provide C redit C ard Details
p:C ardD etails
EndEvent
o:O rder
[no ]
ta : TravelAgency
travels [* ]:T ravel
C ancelOrder
o:O rder
4 8 hours
initOrderFile
checkSolvency
C lientSolvable?
pa : PartnerAgency
y
b:B illing
t:T ravel
C heckAvailability
o:O rder
availability
vpc : VisaPaymentCenter
des tination:s tring
[ye s]
Indicate Price
PlacesAvailable
oc :O rder
cancelTravel
ReservePlace
Withdraw From C redit C ard
or:O rder
SendInvoice
b:B illing
EndEvent
TravelAgency
g
y
i:I nvoic e
reserveTravel
PartnerAgency
g
y
withdraw
solvency
VisaPaymentCenter
y
c :C lient
p:C ardD etails
o:O rder
[no]
ta : TravelAgency
travels [* ]:T ravel
C ancelOrder
o:O rder
4 8 hours
[ye s]
Indicate Price
initOrderFile
SoaML Tutorial, SSAIE 2010
checkSolvency
b:Billing
C lientSolvable?
C heckAvailability
o:O rder
PlacesAvailable
oc :O rder
ReservePlace
or:O rder
34
With
35. Specify capabilities
[optional]
•
A capability identifies a cohesive set of f
bili id ifi
h i
f functions or resources
i
provided by one or more participants.
– Capabilities are used to identify candidate services.
p
y
– Starting point for large business architectures.
•
Modelling techniques:
g
q
– Goal-service modelling
• Identifies capabilities needed to enable business goals.
– Domain decomposition
• Uses activities in business processes and other descriptions of business
functions to identify needed capabilities.
– Existing asset analysis
• Mines capabilities from existing applications.
SoaML Tutorial, SSAIE 2010
35
36. Specify services architectures
(1/3)
• Services architectures
– UML collaborations stereotyped «ServicesArchitecture».
– Identified from the BPMN processes.
p
• Participants
– UML classes stereotyped «Participant»
«Participant».
– Identified from pools, participants and lanes in the BPMN
processes.
• Service contracts.
– UML collaborations stereotyped «ServiceContract».
– Identified from possible interactions between participants
in the BPMN processes.
SoaML Tutorial, SSAIE 2010
36
37. Specify services architectures
(2/3)
Client
Case
study
example
StartEvent
[ye s]
c : Client
[cance l]
des tination:s tring
Each P l
E h Pool can
be mapped to a
Participant
Participant
SelectTravel
t:T ravel
PlaceOrder
confirmInterest
C ancel?
c :C lient
Provide C redit C ard Details
p:C ardD etails
EndEvent
o:O rder
[no ]
ta : TravelAgency
travels [* ]:T ravel
C ancelOrder
o:O rder
4 8 hours
initOrderFile
checkSolvency
C lientSolvable?
pa : PartnerAgency
y
b:B illing
t:T ravel
[ye s]
Indicate Price
C heckAvailability
o:O rder
availability
vpc : VisaPaymentCenter
des tination:s tring
C ancel Travel
[no ]
browse travels
PlacesAvailable
oc :O rder
cancelTravel
ReservePlace
Withdraw From C redit C ard
or:O rder
SendInvoice
b:B illing
EndEvent
TravelAgency
g
y
i:I nvoic e
reserveTravel
PartnerAgency
g
y
withdraw
solvency
VisaPaymentCenter
y
c :C lient
p:C ardD etails
o:O rder
[no]
ta : TravelAgency
travels [* ]:T ravel
C ancelOrder
o:O rder
4 8 hours
[ye s]
Indicate Price
initOrderFile
Interactions between Pools
are categorized as Service
g
categorised as Service
Contracts
Contracts
SoaML Tutorial, SSAIE 2010
checkSolvency
b:Billing
C lientSolvable?
C heckAvailability
o:O rder
PlacesAvailable
oc :O rder
ReservePlace
or:O rder
37
With
38. Specify services architectures
(3/3)
1. C
Create a S
Services Architecture
Case
study
example
2. Identify Participants
f
<<ServicesArchitecture>>
TravelReservation
client
r3:Client
travelAgency
cd:ClientDefinition
visaAccounter
travelAgency
traveller
t
ll
r:TravelAgency
visaC enter
co:CardOperations
r2:VisaPaymentCenter
ti:TravelInformation
tr:TravelReservation
traveller
to:TravelOrder
travelAgency
travelAgency
r1:PartnerAgency
partnerAgency
3.
3 Identify Service Contracts
4. Bind the Participants to the Service Contracts
SoaML Tutorial, SSAIE 2010
38
39. Specify service contracts
(1/2)
• Analyse the BPMN diagrams to identify service contracts.
• This is a design-choice as there is no single construct in
BPMN that resembles a service contract.
• Certain pattern of objects can reveal a service contract, e.g.
– two single tasks follow one after another across a pool or lane
and are
– connected with a sequence flow and associated with a data
object.
• Specify the p
p
y
provider and consumer roles and interfaces
– operations and messages at the business level
SoaML Tutorial, SSAIE 2010
39
40. Specify service contracts
(2/2)
<<ServiceC ontract>>
TravelOrder
trave lle r:
tra ve lAge ncy:Tra ve lO rde r
<<ServiceC ontract>>
TravelInformation
tra ve lle r:
tra ve lAge ncy:Tra ve lInform a tion
SoaML Tutorial, SSAIE 2010
Case
study
example
<<interface>>
TravelOrder
ca nce lO rde r(in orde r : O rde r)
pa yO rde r(in cardDe tails : Ca rdDe ta ils)
cre ate O rde r(in trave l : Trave l, in clie nt : C lie nt):O rde r
<<interface>>
TravelInformation
ge tDe stinations():string[*]
ge tTra ve ls(in de stination : string):Tra ve l[*]
40
41. Specify service choreographies
(service contract behaviour) [optional]
• The service contract behaviour specifies the
choreography:
– what is transmitted and
– when it is transmitted between participants
– to enact a service exchange.
g
• We recommend to model the behaviour of any complex
service contract in order t get a better understanding of
i
t ti
d to t b tt
d t di
f
the interaction between the roles.
– use any UML behaviour or e g BPMN
e.g.
– message sequence between the provider and consumer
interfaces
SoaML Tutorial, SSAIE 2010
41
42. System Architecture
Model (SAM)
System
Architecture
Model
(SAM)
Interfaces
and Messages
Service Interfaces
Service
Choreographies
Ch
hi
Service
Orchestrations
Software Components
• Represents the IT p p
p
perspective of an SOA
– It partitions the system into software components and interfaces.
• Structural modelling to specify components, their interfaces
g
p
y
p
and dependencies:
– Service interfaces
– Interfaces and messages
g
– Software components
• Behavioural modelling to specify component interactions and
g
p
y
p
protocols:
– Service choreographies
– Service orchestrations
SoaML Tutorial, SSAIE 2010
42
43. System
Architecture
Modelling
M d lli
Business
Architecture
Model
(BAM)
Business
Processes
Business Goals
Services
Architectures
Capabilities
Service Contracts and Choreographies
Model to Model (M2M)
System
Architecture
Model
(SAM)
Interfaces
and Messages
Transformation
Service Interfaces
Service
Choreographies
•
The System Architecture
Modelling will refine the
models of the Business
Architecture Modelling.
A hit t
M d lli
SoaML Tutorial, SSAIE 2010
Service
Orchestrations
Software Components
Model to Text (M2T)
PlatformSpecific
Model (PSM)
Transformation
Cloud, Web Services, JEE, MAS, P2P/Grid, SWS
43
44. Specify service interfaces
(1/2)
•
Define service interface as UML class stereotyped «ServiceInterface».
– One-to-one mapping between service contracts and service interfaces.
•
•
Define provided interface as UML interface stereotyped «Provider»
«Provider».
Define consumer interface as UML Interface stereotyped «Consumer».
– The consumer interface is specified only when callbacks are needed.
•
Link the provided and consumer interfaces to the service interface.
– Create an interface realization between the provider interface and the service
interface.
– Create a usage link between the consumer interface and the service interface.
g
•
Create and link a conjugate service interface as UML class stereotyped
«ServiceInterface».
– The name starts with a ‘~’, and represents the counter-part of a service interface.
,
counter part
– It uses the provider interface
– It realizes the consumer interface.
SoaML Tutorial, SSAIE 2010
44
45. Specify service interfaces
(2/2)
~TravelOrderService
<<interface>>
TravelOrder
cre ate O rde r(in orde r : O rde r):integer
ca ncelO rde r(in orde rId : inte ge r)
Case
study
example
Conjugate Service Interface
Provider Interface
(operations can be further
( p
refined from the BAM)
pa yO rde r(in orde rId : inte ge r, in ca rdNb : intege r)
Service Interface
TravelOrderService
T
lO d S
i
~TravelInformationService
<<interface>>
TravelInformation
getDe stina tions():string[*]
getTravels(in d ti ti
tT
l (i destina tion : [*] string):Sim ple T
t i ) Si
l Trave l
getTravelInform ation(in tra velR efe rence : Travel):boolea n
TravelInformationService
SoaML Tutorial, SSAIE 2010
45
46. Specify interfaces and
messages (1/2)
•
Define message types as UML classes stereotyped
«MessageType».
•
The specification of message types is closely linked to the
specification of operations and callbacks in the interfaces.
– Data passed into and/or returned from the invocation of an operation or
into,
event signal defined in an interface.
– For an asynchronous document-centric approach you will typically only
specify one i
if
input parameter.
t
t
– For a synchronous document-centric approach you will typically only
p
y
p p
p
p
specify one input parameter and one response parameter.
•
Message types may have properties that can be either modelled as
UML properties or associated UML classes.
SoaML Tutorial, SSAIE 2010
46
47. Case
study
example
Specify interfaces and
messages (2/2)
Message Type
representing the Travel
Destination
des tination
country : string=null
contine nt : string=null
Travel
travel
0 ..1
travel
publicP rice : string=null
price Voya ge sDiscount : string=null
isHighP riority : boole a n=fa lse
nbP e rsons : inte ge r
travel
Title : string=null
de parture Da te : Date =null
re turnDate : Da te =null
flight
*
Flight
flightId : string=null
1
tra ve lR e fe re nce : string=null
na m e : string=null
partnerT ravelA genc y
travel
0 ..1
c arRental
CarRental
ca te gory : string=null
nbPlace s : inte ge r
re nte r : string=null
string null
startingDa te : Date =null
e ndingDa te : Date =null
travel
hotelBooking
PartnerTravelAgency
*
HotelBooking
de parture : string=null
a rriva l : string=null
se rvice O ffe r : string=null
de parture Da te : Date =null
a rriva lDa te : Date =null
startingDate : Da te =null
e ndingDate : Da te =null
SoaML Tutorial, SSAIE 2010
47
48. Specify service
choreographies [optional]
•
The behaviour of a service interface.
r:trave lle r
– Useful for understanding complex
services.
– Refinement of the service contract
behaviour of the BAM.
•
•
Expresses the expected interactions
p
p
between consumers and providers of
services.
It can be specified as any UML
behaviour.
Case
study
example
this:Trave lO rde r
cre ate O rde r( )
alt
[]
[]
payO rde r( )
cance lO rde r( )
– Activity, interaction or state machine.
– Message sequence between the
provider and consumer interfaces.
SoaML Tutorial, SSAIE 2010
48
49. Specify software
components (1/2)
• Refine the participants of the services architecture by possibly
f
f
decomposing them into several components.
– Use SoaML participants for logical system components.
– Use UML components for components that represent internal designtime software components.
•
Create the ports of the participants/components
– Service port will be typed by a service interface (service provider).
– Request port will be typed by a conjugate service interface (service
consumer).
•
Link the ports through their provided/required interfaces
– The types of the linked ports must be such that a conjugate service
interface is matched by a service interface.
SoaML Tutorial, SSAIE 2010
49
50. Case
study
example
Specify software
components (2/2)
<<ServicesArchitecture>>
TravelReservation
client
r3:Client
cd:ClientDefinition
visaAccounter
travelAgency
traveller
r:TravelAgency
visaC enter
co:CardOperations
r2:VisaPaymentCenter
ti:TravelInformation
tr:TravelReservation
traveller
<<Request>> port, typed by a
Conjugate Service Interface
travelAgency
to:TravelOrder
<<Service>> port, typed
by a Service Interface
travelAgency
travelAgency
r1:PartnerAgency
partnerAgency
Participants are refined
<<Participant>>
Travel Agency Architecture
i:W ebSite
ClientDefinition
i2:C lie ntEntity
:C lientInform ationSe rvice
:C lie ntDe finitionSe rvice
:~C lie ntDe finitionSe rvice
TravelInformation
:~Tra velInform ationSe rvice
i1:Tra velEntity
:~Trave lDe finitionSe rvice
:Trave lInform a tionService
CardOperations
:C a rdO pera tionsService
i3:Tra velR ese rvationProce ss
co:~C ardO pera tionsService
:~Trave lO rde rSe rvice
TravelOrder
i6:VisaPa ym e ntC e nte r
to:Tra velO rderService
tr:~Tra velR ese rvationSe rvice
i7:Pa rtnerAge ncy
om :~O rderManagem entSe rvice
b:~BillingService
OrderManagement
:O rderManagem entSe rvice
i5:O rde rEntity
SoaML Tutorial, SSAIE 2010
Billing
:Trave lR ese rvationSe rvice
TravelReservation
:BillingSe rvice
i4:AccountingDepartm ent
50
51. Specify service
orchestrations [optional]
• Orchestration of services:
– R fi
Refinement of the BPMN processes from the BAM
t f th
f
th
– Seen from the perspective of one specific participant
architecture.
architecture
• Orchestration is specified with activity or BPMN diagram:
– Must be contained in the corresponding participant architecture.
– Each activity represents a call to an operation of an interface
interface.
– Model the control flow between the activities.
SoaML Tutorial, SSAIE 2010
51