Introducing Model Driven SOA
MDA+
SOA=
Model Driven SOA
SoaMLan Emerging Standard for SOA Modeling
Dr. Darius Silingas
Principal Trainer/Consultant
3
Introduction – Who Am I?
Dr. Darius Šilingas� Principal MagicDraw Consultant @ No Magic
Contacts� Skype: darius.silingas� E-mail: [email protected]� Mobile: +37068612748
Professional background� Working in No Magic since 1998� Started as Java/J2EE Programmer, gradually changed the role into
System Architect, Analyst, and Trainer/Consultant
� Run >100 industrial training/consultancy sessions on modeling with UML, and adopting model-driven development with MagicDraw
� Product manager for a Cameo SOA+ plugin for MagicDraw product line, which was the first in the market to adopt SoaML
4
About SoaML (SOA Modeling Language)
Developed by OMG (Object Management Group)Defined as UML profileTargeted at becoming de facto standard in SOA modeling
Currently is in beta 2 version (May, 2010)
Already supported in modeling tools� MagicDraw� Rational Software Architect� Enterprise Architect� …
5
SoaML Goals
Intuitive and complete support for modeling services in UML
Support for bi-directional asynchronous services between multiple participants
Support for service composition
Easily mapped to and made part of a business process specification
Direct mapping to web services
Top-down, bottom up or meet-in-the-middle modeling
Design by contract or dynamic adaptation of services
To specify and relate the service capability and its contract
6
How Does SoaML Accomplish These Goals?
Representation of the Services Architecture� Roles of participants and the services the provide and use for a business
purpose – gives services a context� Participants can be organizations, people or system components� Capabilities provided and used
Specification of Services at the business and technical level� Including simple, bi-directional and n-ary services
� Abstract information model connected to the messaging model� Choreography of service interactions
Specification of Components linked to business architecture� Including composites (Compose applications)� Can be implemented with business processes & process execution
� Implement with new capabilities or by adapting existing systems
Model Driven Architecture Provisioning� Map the SoaML model to technology and other artifacts to avoid manual work
and errors
7
SoaML Profile (1): Service Architecture and Contract
isStrict : Boolean [0..1] = true
«stereotype»
Collaboration
«metaclass»
CollaborationUse
isStrict : Boolean [0..1] = true
«stereotype»
CollaborationUse
«stereotype»
ServicesArchitecture
«stereotype»
ServiceContract
«metaclass»
Collaboration
8
SoaML Profile (2): Participant, Capability, and Service Interface
«stereotype»
Participant
«stereotype»
ServiceInterface
«metaclass»
Dependency
«stereotype»
Agent
«stereotype»
Capability
«metaclass»
Class
«stereotype»
Expose
«metaclass»
Interface
9
SoaML Profile (3): Message Type and Property Extensions
«metaclass»
Signal
«metaclass»
Property
isID : Boolean [0..1]
«stereotype»
Property
encoding : String [0..1]mimeType : String
«stereotype»
Attachment
encoding : String [0..1]
«stereotype»
MessageType
«metaclass»
DataType
«metaclass»
Class
10
SoaML Profile (4): Consumer & Provider; Service & Request
«stereotype»
Consumer
connectorRequired : Boolean [0..1] = true
«stereotype»
Port
«stereotype»
Provider
«stereotype»
Request
«stereotype»
ServiceChannel
«stereotype»
Service
«metaclass»
Interface
«metaclass»
Connector
«metaclass»
Class
«metaclass»
Port
11
SoaML Profile (5): Milestone
«metaclass»
ValueSpecification
«metaclass»
Comment
«metaclass»
Signal
progress : Integer [0..1]
«stereotype»
Milestone
value 0..1signal 0..1
12
What Is Important in Modeling Services?
Service architecture: participants and their used services
Service specifications
Service message types
Service message examples
Service choreography
Service implementation in software components
Provisioning service models in to executable code
13
Service Architecture Diagram
«ServiceContract»
: Ship Status Service
«ServiceContract»
: Shipping Request
«SeviceContract»
: Place Order
«Participant»
: Dealer
«Participant»
: Manufacturer
«Participant»
: Shipper
«ServicesArchitecture»
Dealers Network
consumer
provider
provider
provider
consumerconsumer
14
Service Contract Diagram
«Consumer»
consumer : Order Placer«Provider»
provider : Order Taker
«ServiceContract»
Place Order
15
Message Type Diagram
«Property»reference : Integer{isID}reason : String
«MessageType»
PurchaseOrderReject
OrganizationIndividual
«enumeration»CustomerType
name : String
Customer
«Property»reference : Integer{isID}submitted : date
«MessageType»
PurchaseOrder
«Property»reference : Integer{isID}estimatedDelivery : date
«MessageType»
PurchaseOrderAccept
title : Stringdescription : Stringprice : doublesize : Integer
Product
buyer
1
type 1
product 1..*
16
Service Choreography Diagram
«Consumer»
consumer : Order Placer
«Provider»
provider : Order Taker
[fulfilled]
[else]
alt
PurchaseOrder1:
ShipmentScheduled2:
OrderRejected3:
17
Message Example Diagram
description = "A good modeling tool"price = "545"title = "MagicDraw UML"
MagicDraw : Product
estimatedDelivery = "05/05/2010"reference = 1260
«MessageType»order1260-accept : PurchaseOrderAccept
buyer = ProSoftwaricaproduct = MagicDraw, Cameo SOA+reference = 1260submitted = "04/05/2010"
«MessageType»order1260 : PurchaseOrder
Cameo SOA+ : Product
name = "Prosoftwarica"type = Organization
ProSoftwarica : Customer
18
Participant Composite Structure
«ServiceContract»
: Order Fulfillment Service
«ServiceContract»
: Invoice Service
«ServiceContract»
: Place Order
accounting : Accounting
orderProcessing : OrderProcessing
«Participant»Manufacturer
«ServicePoint» : Seller
provider
provider
provider
consumer
19
Questions
??????..
Coffee Break
Coffee Break
Customizing UML Toolfor Efficient Model-Driven SOA
Dr. Darius SilingasPrincipal Trainer/[email protected]
22
Introduction
Darius has been working with No Magic since 1998. He took part as a developer, architect, and
analyst in multiple international projects. Since 2005, Darius works as a principal MagicDraw
trainer/consultant. He has run over 100 MagicDraw UML training classes and consultations in
18 countries. Darius received PhD from Vytautas Magnus University, where he teaches course
Software Engineering. Darius participates frequently in various conferences and gives talks on
applying UML and other software development topics. He holds the following professional
certificates:
� Microsoft Certified Professional� Sun Certified Programmer for the Java 2 Platform 1.4� OMG-Certified UML Professional Advanced� OMG-Certified Expert in BPM Fundamental
Dr. Darius Šilingas
Principal Trainer/Consultant
23
Unified Modeling Language (UML)
A language (with graphical notation) for modeling object-oriented systems
Defines 248 modeling concepts (metaclasses) and 13 diagram types
A means for visualizing, specifying, constructing, and documenting systems
A de facto standard in software modeling
A core technology for enabling model-driven development
Modelers apply 20% of UML to solve 80% of their problems
� http://www.uml.org
24
Applying UML for Software Development
Package/component structure
Interaction scenarios
Data structure
Service API
GUI navigation schemas
Code generation from UML
Visualization of code structure
Model transformations
Test case action flows
Test data object structures
Interactions for test scenarios
Domain concepts and relations
Domain object lifecycle
Business processes
Actors and use cases
Use cases scenarios
25
Choice of Tools
?
26
Some Claims
UML is complex: 248 metaclasses, 13 diagrams, 1000p spec
A typical modeler needs ~10-20% of UML
UML tools should be customized for the modeling process:� Hide the unused parts of UML� Provide guidelines for an applied modeling method� Automate/facilitate repeating modeling patterns� Integrate with the chain of tools used in development process
27
What is MagicDraw UML?
� Visual UML model editor
� Model-code engineering tool
� System documentation tool (using report templates)
� Modeling collaboration system (using Teamwork Server)
� Domain-Specific Language (DSL) engine
� Customizable framework for model-driven development
� Developed since 1997 – second oldest UML tool in the market!� Sold in >70 countries, used in different business domains� Widely regarded as the most standard-compliant UML tool
28
MagicDraw Principles
Compliance to UML standard� MagicDaw persistence layer was generated from UML metamodel
Productivity in modeling� Writing on diagram, drag & drop, shortcuts, scripting, analysis tools, …
No “out of the box” support for a specific method� There are many methods, we cannot support all of them
Configuration of the tool� UML is complex, the users should be able to simplify the environment
Extensibility of the tool� Open API in Java, Velocity-based report templates, emerging open AMI
Excellence in support of customers� Support questions are answered by the whole MagicDraw R&D team
� Services team provides trainings, consultations, custom development
29
MagicDraw Customization and Extension Capabilities
Configuration(User Perspectives,
Environment and Project Options)
MagicDraw
Scripting(Jython, JRuby,
Javascript, BeanShell)
Open AMI(UML-based DSLs)
Report Templates(Velocity)
Open API(Java)
Hiding not used main and context menus, toolbars, manipulators, …Spell checking, backup policies, …
Default project color schema
Generate custom navigable or printable documentsGenerate custom code
Add additional functionalitiesAutomate repeating modeling tasksCustom integrations with tool chain
Defining DSLBuilding validation rule suites
Specifying wizards for modeling guidelines
Quick automated user model data manipulation
30
Customized Environment Example – SOA Data Modelers
Data Architects group @ BigCompany wants to apply UML for service message modeling
They have the following needs:� Use a small subset of class modeling capabilities for defining data types� Generate XML schemas from class models
� Generate printable documents from class models� Use object modeling capabilities for defining data examples� Generate XML documents from object models
� Hide the unused tool features� Ensure data model completeness and correctness� Provide automation to facilitate creating object diagrams from class diagrams
31
Workflow of Developing Custom Modeling Environment
� More efficient than running generic modeling + UML + tool trainings
32
Building Domain-Specific Modeling Environment
� Domain metamodel
� Domain profile
� Customization suite
� Custom diagrams
� Validation suites
� Custom report templates
� Sample models
� Custom plug-ins
� Custom user perspective
Daniel B.
{company = No Magic, Inc. , experience = "20+ years", salary = 10000 }
No Magic, Inc.
MagicDraw 12.5Development
Applying DoDAFTraining Course
RequirementsProgramming
Mindaugas R. Nerijus J.
«coordinate»«work»
«work» «work»
«manage»
33
Model Validation: Correctness and Completeness
Modeling like programming is an error-prone process
A user model can be either incorrect (it breaks some rules) or incomplete (it lacks some required information)
Rules defined in UML specification are automated in MagicDraw
However, a specific modeling method typically implies additional rules� Restriction to single generalization for classes
� Compulsory role names on navigable association ends� Each use case must be documented with owned comment
MagicDraw provides a way to define validation rules and validate models� Validation rules can be specified on OCL 2.0 or Java
34
Simple Model Validation Demo
35
Report Wizard Purpose
You can generate an HTML, Reach Text and Open Office documents, XML or any other simple text report for a modeling project
MagicDraw Report Engine
Properties
36
Model Report as Model Transformation
• Model 2 Code using Code Engineering Sets
• Model 2 Model using plug-in Transformations
• Model 2 Document using Report Wizard with Templates
Concept Description
#forrow ($class in
$sorter.sort($Class, “name”)) $report.getIconFor($class) $class.name
$report.getComment($class) #endrow
Concept Description
Reader Information about library customer.
Request Document registering reader's wish to have a new title in a library.
Request Evaluation Librarian's decision whether to approve or deny reader's request.
Title Information about a book, journal or another kind of library inventory item. Library may contain multiple copies of the same title.
37
Environment and Project Options
Environment Options allow to configure MagicDraw application with user-specific preferences that are shared for all projects and stored in configuration file at user’s MagicDraw home� Go to menu: Options | Environment
� Examples: Language, Create backup file, Active validation period, Diagram load mode, Shortcut keys, etc.
Project Options allow to configure MagicDraw application with project-specific preferences that are stored in project file� Go to menu: Options | Project
� Examples: Symbol Property Styles, Default Model Properties, Code Engineering Settings, …
� Project Options can be reused via Template Project!
38
User Perspectives
MagicDraw UML provides several default perspectives that customize modeling environment according to user’s role:� Full Featured� Business Analyst� Software Architect� System Analyst
User perspective defines what menus, toolbars, diagramming features are visible for the user.
It is recommended to create custom user perspective if you apply domain-specific language and/or method.
39
Where To Go To Learn More
MagicDraw home: www.magicdraw.com� MagicDraw features� New and Noteworthy� Newsgroups� FAQ� Resources (articles, whitepapers, case studies)
MagicDraw online demos: http://www.magicdraw.com/viewlets
MagicDraw UML installation contains directories:� manual – multiple user manuals in PDF format� samples – sample projects, code samples for reverse, etc.
MagicDraw support � [email protected] – answers in 24h!
Online training resources � http://training.nomagic.com
40
Follow Up
A more detailed whitepaper is under preparation� Estimated publishing time – July, 2010� Check out at http://training.nomagic.com
Let’s Keep in Touch� Register at http://www.magicdraw.com� My e-mail: [email protected]� My Skype: darius.silingas� Get connected with me at LinkedIn� Exchange business cards