SoaML Tutorial Service Modelling with SoaML Brian Elvesæter, SINTEF ICT

advertisement
Service-oriented Heterogeneous Architecture and Platforms Engineering
SoaML Tutorial
Service Modelling with SoaML
Brian Elvesæter, SINTEF ICT
brian.elvesater@sintef.no
Tutorial outline
• Introduction
I t d ti
– 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
Introduction
SoaML Tutorial, SSAIE 2010
3
What you will learn
• Today
T d
– 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
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
p
p p j
gy_OnlineLibraryy_final/index.htm
SoaML specification
–
•
http://www.shape-project.eu/
http://modeliosoft.com
S ML Designer
SoaML
D i
and
d SoaML
S ML Engine
E i modules
d l ffor Modelio
M d li
–
http://rd.softeam.com/prototypes/
SoaML Tutorial, SSAIE 2010
5
SoaML language
g g
SoaML Tutorial, SSAIE 2010
6
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
i t
integration
ti with
ith BPMN,
BPMN BMM and
d other
th
metamodels.
SoaML Tutorial, SSAIE 2010
7
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
B1
S2(2)
Revised Submission
November 19, 2007
OMG
O
G Technical Meeting
June 23-27, 2008 *
Ontario Canada
Revised Submission
Deadline Aug 25, 2008
SoaML FTF Feb., 2009
OMG Technical Meeting
Dec 08-12, 2008 *
Santa Clara EEUU
Voting List Deadline
August 5, 2007
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
2.0,
0 Dec
Dec. 2009
SoaML Tutorial, SSAIE 2010
Sx – Submission version x
Bx – Beta version x
SoaML final standard
March, 2010 (veto, by
Oct 2010)
Oct.
8
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
S
i
architectures
hit t
where
h
parties provide and use multiple
services.
•
Design
D
i b
by contract
t t or d
dynamic
i
adaptation of services.
•
Service capabilityy and its contract.
•
No changes to UML.
•
•
Services defined to contain other
services.
Mapped
pp to and p
part of a business
process specification.
SoaML Tutorial, SSAIE 2010
9
SOA in Model Driven
Architecture (MDA)
Business Concerns
Business Model
Enterprise Services
(e-SOA)
Goals
Roles, Collaborations & Interactions
Process & Information
Logical
g
System
y Customers
Model
Technology Services (t-SOA)
Costs
Software Components
Interfaces, Messages & Data
Agility
Technology Specification
Line-O
Of-Sight
P li
Policy
Refinement & Automa
ation
Pla
atform Platform
Computattion
m
Sp
pecific Independent In
ndependent
Mo
odel
Model
M
Model
MDA
Terms
JMS,, JEE,, Web Services
WSDL, BPEL, XML Schema
SoaML Tutorial, SSAIE 2010
10
SoaML – Service and SOA
•
”A service
i iis value
l delivered
d li
d to another
h through
h
h a well-defined
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
i an architectural
hit t l paradigm
di
ffor d
defining
fi i h
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 SSAIE 2010
SoaML Tutorial,
SoaML – Capabilities
• UML extensions to support service modelling:
– identifying services
– specifying services
– defining
d fi i service
i consumers and
d providers
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
SoaML – Concepts
•
Agent
•
Participant
•
Attachment
•
Port
•
C
Capability
bilit
•
P
Property
t
•
Consumer
•
Provider
•
C ll b ti
Collaboration
•
R
Request
t
•
CollaborationUse
•
ServiceChannel
•
Expose
•
ServiceContract
•
MessageType
•
ServiceInterface
•
Milestone
•
Service
•
ServicesArchitecture
SoaML Tutorial, SSAIE 2010
13
Marketplace Services
Example
Acme Industries
Mechanics Are Us
Manufacturer
Consu
umer
D l
Dealer
Proviider
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
Business process overview
: Dealer
Place order
: OrderHandlerr
: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
Shi item
Ship
it
Send shipping confirmation
SoaML Tutorial, SSAIE 2010
:D eliveryC onfirmation
Send delivery confirmation
End event
15
Services architecture
(Community-level)
<<ServicesArchitecture>>
Dealer Net
Deale
Network
o k Architecture
A chitect e
Pl
Place
O
Order
d service
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
providing
p
g and using
g services expressed
p
as service contracts.
• UML collaboration stereotyped «ServicesArchitecture».
SoaML Tutorial, SSAIE 2010
16
<<ServicesArchitecture>>
Dealer Network Architecture
consumer
orde
d r:Pla
Pl ce O rde
d r
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
provider
p
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
t
type
<<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
Services architecture
(Participant-level)
Order
OrderHandler
Conformation
Invoicing
Shipped
Productions
Ship Req
Shipped
<<ServicesArchitecture>>
Manufacturer Architecture
i:Invoicing
de ale r:De ale r
provider
consumer
Delivered
orde r:Pla ce O rder
consumer
provider
ic:Invoice C ustom er
oh:O rderHa ndle r
Participant-level
services architecture
for the Manufacturer
consumer
ship:Shipping R e que st
provider
shipper:Shipper
SoaML Tutorial, SSAIE 2010
consumer
po:P roduction O rder
provider
p:Productions
18
<<ServicesArchitecture>>
Dealer Network Architecture
consumer
orde
d r:Pla
Pl ce O rde
d r
de a le r:De a le r
provider
p
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
f the
for
th Dealer
D l N
Network
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
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
p
an agreement
g
between the involved
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
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
yp «ServiceInterface» and the names starts with a ‘~’
SoaML Tutorial, SSAIE 2010
21
Choreography: Place order
(Service
(S
i contract
t
t behaviour)
b 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 : OrrderPlacer
[]
quote
order
orderC onfirmation
provider : OrderTak
ker
orde rC onfirm a tion
SoaML Tutorial, SSAIE 2010
quoteRequest
order
22
Interfaces and message types:
Place order
Consumer
Provider
<<interface,
interface, Provider>>
Provider
OrderTaker
<<interface,
interface, Consumer>>
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>>
Q t R
QuoteRequest
t
EUR
USD
<<MessageType>>
O d
Order
<<MessageType>>
Q t
Quote
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
quantity
q
y : inte ge
g r
<<MessageType>>
O d C fi
OrderConfirmation
ti
<<enumeration>>
C urrencyType
<<enumeration>>
C onfirmationType
shipm
p e ntID : string
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
yp «Consumer».
Message type:
• Specifies the information exchanged between service consumers and providers.
yp «MessageType».
g yp
• UML class stereotyped
SoaML Tutorial, SSAIE 2010
23
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
p
a feature of a p
participant
p
that is the offer of a service by
y one
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 p
port stereotyped
yp «Request»
q
on a p
participant
p
or component.
p
SoaML Tutorial, SSAIE 2010
24
<<ServicesArchitecture>>
Dealer Network Architecture
consumer
orde
d r:Pla
Pl ce O rde
d r
de a le r:De a le r
provider
p
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 e que st>>
t
ssi:~ShipSta
i Shi St tusInte
t I t rface
f
<<R
OrderTaker
OrderPlacer
<<Se rvice >> s:P la
l ce O rde
d rInte rfa
f ce
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
<<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>>
D l
Dealer
<<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
SoaML methodology
gy
SoaML Tutorial, SSAIE 2010
27
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
•B
Business pe
erspective o
on SOA
• IT perspective on SOA
A
Business
Architecture
Model
((BAM))
Service
Choreographies
Service
O h t ti
Orchestrations
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
aML
L Metho
odo
olog
gy
Flexible
Business
Model (CIM)
28
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.
– Service
S
i contracts
t
t between
b t
the
th business
b i
entities
titi participating
ti i ti iin th
the
community.
SoaML Tutorial, SSAIE 2010
29
Case study:
y Travel agency
g
y
(Discount Voyage)
• A Travel Agency has some
contact with Partner Agencies
which provide reservation for
Flights Hotels
Flights,
Hotels, Cars
Cars, etc
etc.
Client
Rese
erve
Pay
Cancel
• A Client can interact with the
Travel Agency to:
Ha
ands on
Partner
Agency
Insurance Purchase
P
SoaML Tutorial, SSAIE 2010
Visa
Travel resservation 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
Business
Architecture
M d lli
Modelling
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
Define
business goals
•
Business
B
i
M
Motivation
i i M
Model
d l
(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
p
yg
goals and their
relationships
– Perform goal analysis linking the
goals to existing or potential new
business processes
<<part>>
<<part>>
<<part>>
Internet Access
M i i
Maximize
personnell productivity
d ti it
C ash-flow management
<<part>>
Automation of accounting department activities
SoaML Tutorial, SSAIE 2010
32
Refine business processes
(1/2)
•
Id if relevant
Identify
l
b
business
i
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.
• Map
M to
t participant-level
ti i
tl
l services
i
architectures
hit t
i S
in
SoaML.
ML
•
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
p to service contracts in SoaML
– Identify the control and data flows between these tasks.
• Map to message types in SoaML
SoaML Tutorial, SSAIE 2010
33
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
Specify capabilities
[optional]
•
A capability
bili identifies
id ifi a cohesive
h i set off ffunctions
i
or resources
provided by one or more participants.
– Capabilities
p
are used to identify
y candidate services.
– Starting point for large business architectures.
•
Modelling
g techniques:
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
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
Specify services architectures
(2/3)
Client
Case
study
example
StartEvent
[ye s]
c : Client
[cance l]
des tination:s tring
Eachh Pool
E
P l 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
Service
g
as
categorised
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
Specify services architectures
(3/3)
1. Create
C
aS
Services Architecture
Case
study
example
2. Identify
f Participants
<<ServicesArchitecture>>
TravelReservation
client
r3:Client
travelAgency
cd:ClientDefinition
visaAccounter
travelAgency
t
traveller
ll
r:TravelAgency
visaC enter
co:CardOperations
r2:VisaPaymentCenter
ti:TravelInformation
tr:TravelReservation
traveller
to:TravelOrder
travelAgency
travelAgency
r1:PartnerAgency
partnerAgency
3 Identify Service Contracts
3.
4. Bind the Participants to the Service Contracts
SoaML Tutorial, SSAIE 2010
38
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
p
y the p
provider and consumer roles and interfaces
– operations and messages at the business level
SoaML Tutorial, SSAIE 2010
39
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
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
i contract
t t in
i order
d tto gett a better
b tt understanding
d t di off
the interaction between the roles.
– use any UML behaviour or e
e.g.
g BPMN
– message sequence between the provider and consumer
interfaces
SoaML Tutorial, SSAIE 2010
41
System Architecture
Model (SAM)
System
Architecture
Model
(SAM)
Interfaces
and Messages
Service Interfaces
Service
Ch
Choreographies
hi
Service
Orchestrations
Software Components
• Represents
p
the IT p
perspective
p
of an SOA
– It partitions the system into software components and interfaces.
• Structural modelling
g to specify
p
y components,
p
their interfaces
and dependencies:
– Service interfaces
– Interfaces and messages
g
– Software components
• Behavioural modelling
g to specify
p
y component
p
interactions and
protocols:
– Service choreographies
– Service orchestrations
SoaML Tutorial, SSAIE 2010
42
System
Architecture
M d lli
Modelling
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
A hit t
Architecture
Modelling.
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
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
g link between the consumer interface and the service interface.
•
Create and link a conjugate service interface as UML class stereotyped
«ServiceInterface».
– The name starts with a ‘~’,, and represents the counter-part
counter part of a service interface.
– It uses the provider interface
– It realizes the consumer interface.
SoaML Tutorial, SSAIE 2010
44
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
p
can be further
refined from the BAM)
pa yO rde r(in orde rId : inte ge r, in ca rdNb : intege r)
Service Interface
T
TravelOrderService
lO d S
i
~TravelInformationService
<<interface>>
TravelInformation
getDe stina tions():string[*]
getTravels(in
tT
l (i d
destina
ti ti
tion : [*] string):Sim
t i ) Si ple
l T
Trave l
getTravelInform ation(in tra velR efe rence : Travel):boolea n
TravelInformationService
SoaML Tutorial, SSAIE 2010
45
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
into, and/or returned from the invocation of an operation or
event signal defined in an interface.
– For an asynchronous document-centric approach you will typically only
specify
if one input
i
t parameter.
t
– For a synchronous document-centric approach you will typically only
p
y one input
p parameter
p
and one response
p
parameter.
p
specify
•
Message types may have properties that can be either modelled as
UML properties or associated UML classes.
SoaML Tutorial, SSAIE 2010
46
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
hotelBooking
PartnerTravelAgency
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
string=null
null
startingDa te : Date =null
e ndingDa te : Date =null
travel
*
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
1
tra ve lR e fe re nce : string=null
47
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
p
the expected
p
interactions
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
Specify software
components (1/2)
• Refine
f
the participants off the services architecture by possibly
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
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
Specify service
orchestrations [optional]
• Orchestration of services:
– Refinement
R fi
t off the
th BPMN processes from
f
the
th BAM
– 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
Thanks for y
your attention
SoaML Tutorial, SSAIE 2010
52
Download