IBM Software Group ® Clic k to edit Ma ster sub title styl e An Introduction to UML 2.0 Bran Selic IBM Distinguished Engineer IBM Rational Software – Canada
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 2 IBM Software Group | DISCLAIMER The technical material described here is still under development and is subject to modification prior to full adoption by the Object Management Group
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 3 IBM Software Group | 1967 Foundations of OO (Nygaard, Goldberg, Meyer, Stroustrup, Harel, Wirfs-Brock, Reenskaug,…) UML: The Foundation of MDA 1996 UML 1.1 (OMG Standard) UML 1.3 (extensibility) UML 1.4 (action semantics) UML Q2003 3Q2004 UML 2.0 (MDA) Jacobson Harel Booch Rumbaugh
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 4 IBM Software Group | Formal RFP Requirements 1)Infrastructure – UML internals More precise conceptual base for better MDA support 2)Superstructure – User-level features New capabilities for large-scale software systems Consolidation of existing features 3)OCL – Constraint language Full conceptual alignment with UML 4)Diagram interchange standard For exchanging graphic information (model diagrams) 1)Infrastructure – UML internals More precise conceptual base for better MDA support 2)Superstructure – User-level features New capabilities for large-scale software systems Consolidation of existing features 3)OCL – Constraint language Full conceptual alignment with UML 4)Diagram interchange standard For exchanging graphic information (model diagrams)
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 5 IBM Software Group | Language Structure A core language + a set of optional “sub-languages” Defined in three separate compliance levels A core language + a set of optional “sub-languages” Defined in three separate compliance levels OCL Basic UML (Classes, Basic behavior, Internal structure, Use cases…) MOF Profiles State Machines Structured Classes and Components ActivitiesInteractions Detailed Actions Flows Basic Level Intermediate Level Complete Level UML Infrastructure Multiple levels of compliance
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 6 IBM Software Group | UMLUML UML-MOF Alignment Shared conceptual base MOF: language for defining modeling languages UML: general purpose modeling language Shared conceptual base MOF: language for defining modeling languages UML: general purpose modeling language Infrastructure Library MOF “Superstructure” «import» UML Superstructure «import» MOFMOF
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 7 IBM Software Group | «import» ClassifiersClassifiers NamespaceNamespace ElementElementNamedElementNamedElement name : String NamespaceNamespace Infrastructure Example: Classifier Definition Constructed from a basic set of primitive concepts «import» OwnershipOwnership ElementElement ClassifierClassifierNamespaceNamespaceNamedElementNamedElement FeatureFeature
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 8 IBM Software Group | UML 2.0: Run-Time Semantics Basic Structural Concepts BehaviorFoundation Interactions (Communications)... Activities State Machines Actions
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 9 IBM Software Group | ActivityM Behavioral Foundations Data/control flow foundations for maximal implementation flexibility Action1 VariableAVariableA Action Action2 Input Pin (typed) OutputPin (typed) Control Flow Data Flow
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 10 IBM Software Group | Categories of Actions Communication actions (send, call, receive,…) Primitive function action Object actions (create, destroy, reclassify,start,…) Structural feature actions (read, write, clear,…) Link actions (create, destroy, read, write,…) Variable actions (read, write, clear,…) Exception action (raise) Communication actions (send, call, receive,…) Primitive function action Object actions (create, destroy, reclassify,start,…) Structural feature actions (read, write, clear,…) Link actions (create, destroy, read, write,…) Variable actions (read, write, clear,…) Exception action (raise)
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 11 IBM Software Group | Activities Significantly enriched in UML 2.0 (relative to UML 1.x activities) More flexible semantics for greater modeling power (e.g., rich concurrency model based on Petri Nets) Many new features Major influences for UML 2.0 activity semantics Business Process Execution Language for Web Services (BPEL4WS) – a de facto standard supported by key industry players (Microsoft, IBM, etc.) Functional modeling from the systems engineering community (INCOSE) Significantly enriched in UML 2.0 (relative to UML 1.x activities) More flexible semantics for greater modeling power (e.g., rich concurrency model based on Petri Nets) Many new features Major influences for UML 2.0 activity semantics Business Process Execution Language for Web Services (BPEL4WS) – a de facto standard supported by key industry players (Microsoft, IBM, etc.) Functional modeling from the systems engineering community (INCOSE)
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 12 IBM Software Group | Order Order Processing Invoice : InvoiceKind Activity Graph Example Receive order Fill order Ship order Send invoice Make payment Invoice Accept payment Close order Interruptible Region Input pin «precondition» Order entered «postcondition» Order complete contracts parameter Cancel order Order cancel request
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 13 IBM Software Group | Company Customer Accounting OrderDepartment Partitioning capabilities Receive order Fill order Ship order Send invoice Make payment Invoice Accept payment Close order Seattle Reno
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 14 IBM Software Group | sd ATM-transaction client:atm:dbase: Interaction Diagrams insertCard CheckPin ref alt [chk= OK] [else] error(badPIN) DoTransaction ref sd CheckPin client:atm:dbase: askForPIN data(PIN) check(PIN) result(chk) Interaction Frame Lifeline is one object or a part Interaction Occurrence Combined (in-line) Fragment
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 15 IBM Software Group | Combined Fragment Types (1 of 2) Alternatives ( alt ) choice of behaviors – at most one will execute depends on the value of the guard (“else” guard supported) Option ( opt ) Special case of alternative Break ( break ) Represents an alternative that is executed instead of the remainder of the fragment (like a break in a loop) Parallel ( par ) Concurrent (interleaved) sub-scenarios Negative ( neg ) Identifies sequences that must not occur Alternatives ( alt ) choice of behaviors – at most one will execute depends on the value of the guard (“else” guard supported) Option ( opt ) Special case of alternative Break ( break ) Represents an alternative that is executed instead of the remainder of the fragment (like a break in a loop) Parallel ( par ) Concurrent (interleaved) sub-scenarios Negative ( neg ) Identifies sequences that must not occur
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 16 IBM Software Group | Combined Fragment Types (2 of 2) Critical Region ( region ) Traces cannot be interleaved with events on any of the participating lifelines Assertion ( assert ) Only valid continuation Loop ( loop ) Optional guard: [,, ] No guard means no specified limit Critical Region ( region ) Traces cannot be interleaved with events on any of the participating lifelines Assertion ( assert ) Only valid continuation Loop ( loop ) Optional guard: [,, ] No guard means no specified limit
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 17 IBM Software Group | sd Reader r : Reader t1 Timing Diagrams (cont.) Reading Idle Uninitialized Initialize Read ReadDoneRead {d..d+0.5} {t1..t1+0.1} State Event Occurrence Constraint Observation
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 18 IBM Software Group | Structured Classes Classes with Internal (collaboration) structure Ports (optional) Primarily intended for architectural modeling Heritage: architectural description languages (ADLs) UML-RT profile: Selic and Rumbaugh (1998) ACME: Garlan et al. SDL (ITU-T standard Z.100) Classes with Internal (collaboration) structure Ports (optional) Primarily intended for architectural modeling Heritage: architectural description languages (ADLs) UML-RT profile: Selic and Rumbaugh (1998) ACME: Garlan et al. SDL (ITU-T standard Z.100)
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 19 IBM Software Group | Structured Objects: Ports Multiple points of interaction Each dedicated to a particular purpose Multiple points of interaction Each dedicated to a particular purpose e.g., Database Admin port e.g., Database Object e.g., Database User ports
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 20 IBM Software Group | Port Semantics A port can support multiple interface specifications Provided interfaces (what the object can do) Required interfaces (what the object needs to do its job) A port can support multiple interface specifications Provided interfaces (what the object can do) Required interfaces (what the object needs to do its job) «interface» MasterIF stateChange ( s : state ) : void … «provides» Incoming signals/calls «interface» SlaveIF start ( ) : void stop ( ) : void queryState ( ) : state … «uses» p1 c:ClassXc:ClassX Outgoing signals/calls
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 21 IBM Software Group | sender : Fax remoteremote receiver : Fax remoteremote Assembling Structured Objects These connections can be constrained to a protocol :FaxProtocol FaxSenderFaxReceiver Ports can be joined by connectors Static checks for dynamic type violations are possible Eliminates “integration” (architectural) errors Static checks for dynamic type violations are possible Eliminates “integration” (architectural) errors
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 22 IBM Software Group | FaxCall receiveCtrl sendCtrl sender:Fax remote receiver:Fax remote c c c c Structured Classes: Internal Structure Structured classes may have an internal structure of (structured class) parts and connectors Delegation connector PartPart
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 23 IBM Software Group | ProductArchitecture sender:Faxsender:Fax receiver:Fax receiver:Fax Structure Refinement Through Inheritance Using standard inheritance mechanism (design by difference) ProductB sender:Faxsender:Fax receiver:Fax receiver:Fax ProductA sender:Faxsender:Fax receiver:Fax receiver:Fax mgr:FaxMgrmgr:FaxMgr
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 24 IBM Software Group | ReadAmountSM selectAmount EnterAmount ok abort aborted amount otherAmount abort again Modular Submachines: Definition EXIT point ENTRY point Submachine definition Submachine definition
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 25 IBM Software Group | VerifyCard OutOfService acceptCard ReleaseCard VerifyTransaction outOfService releaseCard ATM ReadAmount : ReadAmountSM aborted rejectTransaction again Modular Submachines: Usage usage of exit point usage of exit point usage of entry point usage of entry point invoked submachine invoked submachine
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 26 IBM Software Group | Example: State Machine Redefinition State machine of ATM to be redefined VerifyCard ReadAmount selectAmount acceptCard ReleaseCard VerifyTransaction selectAmount amount outOfService releaseCard OutOfService ATM {final}
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 27 IBM Software Group | VerifyCard acceptCard ReleaseCard VerifyTransaction outOfService releaseCard OutOfService ATM {final} ReadAmount selectAmount amount State Machine Redefinition enterAmount okreject {extended} otherAmount {extended} FlexibleATM
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 28 IBM Software Group | Summary: UML 2.0 First major revision of UML Primarily motivated by the need to better support MDD Characterized by Modular language structure Increased semantic precision and conceptual clarity Recursive concepts definition for scalability Small number of new modeling features – selected to better support scalability Structured classes for architectural specifications Complex and reusable interactions modeling Sophisticated functional modeling capabilities (activities) First major revision of UML Primarily motivated by the need to better support MDD Characterized by Modular language structure Increased semantic precision and conceptual clarity Recursive concepts definition for scalability Small number of new modeling features – selected to better support scalability Structured classes for architectural specifications Complex and reusable interactions modeling Sophisticated functional modeling capabilities (activities)
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located on your toolbar Click on the object you want to colorize Helpful tip: Double click the paintbrush tool to apply color to more than one object at a time. To use or remove these color palettes, go to View/Master/Slide Master Optional logo for your notes/handouts slides Do not use Gradient fills for slides to be used for Webinars 29 IBM Software Group | QUESTIONS? QUESTIONS?