Introducing Model Driven SOA MDA + SOA = Model Driven SOA SoaML an Emerging Standard for SOA Modeling Dr. Darius Silingas Principal Trainer/Consultant darius.silingas@nomagic.com
Introduction Who Am I? Dr. Darius Šilingas Principal MagicDraw Consultant @ No Magic Contacts Skype: darius.silingas E-mail: darius.silingas@nomagic.com 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 3 About SoaML (SOA Modeling Language) Developed by OMG (Object Management Group) Defined as UML profile Targeted 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 4
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 5 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 6
SoaML Profile (1): Service Architecture and Contract Collaboration CollaborationUse Collaboration isstrict : Boolean [0..1] = true CollaborationUse isstrict : Boolean [0..1] = true ServicesArchitecture ServiceContract 7 SoaML Profile (2): Participant, Capability, and Service Interface Participant Class Capability Agent ServiceInterface Interface Expose Dependency 8
SoaML Profile (3): Message Type and Property Extensions Signal Class DataType MessageType encoding : String [0..1] Property isid : Boolean [0..1] Property Attachment encoding : String [0..1] mimetype : String 9 SoaML Profile (4): Consumer & Provider; Service & Request Port connectorrequired : Boolean [0..1] = true Port Request Service Consumer Connector Interface ServiceChannel Provider Class 10
SoaML Profile (5): Milestone Comment Milestone progress : Integer [0..1] Signal signal 0..1 value 0..1 ValueSpecification 11 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 12
Service Architecture Diagram «ServicesArchitecture» Dealers Network «Participant» : Dealer consumer «SeviceContract» : Place Order provider «Participant» : Manufacturer consumer «ServiceContract» : Ship Status Service provider «Participant» : Shipper provider consumer «ServiceContract» : Shipping Request 13 Service Contract Diagram «ServiceContract» Place Order «Consumer» consumer : Order Placer «Provider» provider : Order Taker 14
Message Type Diagram Product title : String description : String price : double size : Integer product 1..* buyer 1 name : String Customer «MessageType» PurchaseOrder «Property»reference : Integer{isID} submitted : date Individual Organization type 1 «enumeration» CustomerType «MessageType» PurchaseOrderAccept «Property»reference : Integer{isID} estimateddelivery : date «MessageType» PurchaseOrderReject «Property»reference : Integer{isID} reason : String 15 Service Choreography Diagram «Consumer» consumer : Order Placer «Provider» provider : Order Taker 1: PurchaseOrder alt [fulfilled] 2: ShipmentScheduled [else] 3: OrderRejected 16
Message Example Diagram MagicDraw : Product description = "A good modeling tool" price = "545" title = "MagicDraw UML" ProSoftwarica : Customer name = "Prosoftwarica" type = Organization «MessageType» order1260 : PurchaseOrder buyer = ProSoftwarica product = MagicDraw, Cameo SOA+ reference = 1260 submitted = "04/05/2010" Cameo SOA+ : Product «MessageType» order1260-accept : PurchaseOrderAccept estimateddelivery = "05/05/2010" reference = 1260 17 Participant Composite Structure «Participant» Manufacturer «ServiceContract» : Invoice Service provider accounting : Accounting «ServicePoint» : Seller consumer «ServiceContract» : Order Fulfillment Service «ServiceContract» : Place Order provider provider orderprocessing : OrderProcessing 18
Questions??????.. 19 Coffee Break Coffee Break
Customizing UML Tool for Efficient Model-Driven SOA Dr. Darius Silingas Principal Trainer/Consultant darius.silingas@nomagic.com Introduction Dr. Darius Šilingas Principal Trainer/Consultant darius.silingas@nomagic.com 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 22
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 23 Applying UML for Software Development Domain concepts and relations Domain object lifecycle Business processes Actors and use cases Use cases scenarios Package/component structure Interaction scenarios Data structure Service API GUI navigation schemas Test case action flows Test data object structures Interactions for test scenarios Code generation from UML Visualization of code structure Model transformations 24
Choice of Tools? 25 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 26
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 27 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 28
MagicDraw Customization and Extension Capabilities Hiding not used main and context menus, toolbars, manipulators, Spell checking, backup policies, Default project color schema Generate custom navigable or printable documents Generate custom code Configuration (User Perspectives, Environment and Project Options) Quick automated user model data manipulation MagicDraw Report Templates (Velocity) Scripting (Jython, JRuby, Javascript, BeanShell) Open API (Java) Add additional functionalities Automate repeating modeling tasks Custom integrations with tool chain Open AMI (UML-based DSLs) Defining DSL Building validation rule suites Specifying wizards for modeling guidelines 29 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 30
Workflow of Developing Custom Modeling Environment More efficient than running generic modeling + UML + tool trainings 31 Building Domain-Specific Modeling Environment Domain metamodel No Magic, Inc. Domain profile Customization suite Applying DoDAF Training Course «work» «coordinate» MagicDraw 12.5 Development Custom diagrams Validation suites Custom report templates Daniel B. {company = No Magic, Inc., experience = "20+ years", salary = 10000 } «manage» Programming Requirements «work» «work» Mindaugas R. Nerijus J. Sample models Custom plug-ins Custom user perspective 32
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 33 Simple Model Validation Demo 34
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 35 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 #forrow ($class in $sorter.sort($class, name )) $report.geticonfor($class) $class.name Description $report.getcomment($class) #endrow Concept Reader Request Description Information about library customer. 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. 36
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! 37 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. 38
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 support@magicdraw.com answers in 24h! Online training resources http://training.nomagic.com 39 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: darius.silingas@nomagic.com My Skype: darius.silingas Get connected with me at LinkedIn Exchange business cards 40