OMG MDA Implementers Conference UML 2.0 Support for MDA in Dynamic Models: How Practical is Execution from Behavioral Models? David Fado, May 2003
Introduction! UML 2 behavior diagrams offer enhanced ability to convey information.! Behavior sections show a significant upgrade in UML 2, the start of a new focus in UML.! A large number of features give UML 2 significant diagram overlap.! Focus in this presentation is on flow control and management at a high level to review elements that will be practical for making UML more executable.! Features will compete and slowly generate working solutions, probably after a period of diagram wars.
Diagram Overview! Activity Diagrams! Interaction Diagrams Sequence Interaction Overview Timing Communication (formerly collaboration) Interaction Table! State Machines Behavioral Protocol State Machines
Interaction Diagrams (Sequence)! Fragments: Interaction fragments make a sequence diagram more meaningful by allowing for many flows on the same page.! Combined fragments allow for an operator to show specific behavior for a defined fragment: Loops, alternative paths, etc.! Sequencing rules clearer and user defined.! InteractionOccurence allows for reuse of fragments.! Handles composite structures.! Continuations help with flow control.
Interaction Diagram 1: Fragments No Blackboard Blackboard
Interaction Diagram 2: Regions Basic fragments from UML Specification Draft, March 2003
Activity Diagram Overview Detailed token flow model Exception handling Basic flow features Can link to a classifier, or not Expansion nodes Lots of name changes, but more semantic precision Loops Link to an action language or any language Interruptible activity region
Activity Diagram: Expansion Region
Activity Diagram: Loop Node The loop still has some notation features left undefined in the specification
State Machine Overview Generalizable, or redefineable, to allow a state machine to reference a class that also has a generalization relationship. More rigorous specification. Transitions can also be redefined. New words: Orthogonal Composite States/ Regions used to show parallel or concurrent states. Protocol state machines and ports allow for clearer defintion of component behavior.
State Machines: Inheritance Orthogonal composite states and a state extended on the next page
State Machine: Inheritance The eye glass symbol shows you can drill down.
Protocol State Machine
Observations! For developers, lightweight UML on top of an IDE offers the most promise to avoid models getting out of touch with the code. Detailed specifications makes this possible.! Reverse engineering important for assessing legacy code, and looks hard to do with behavioral diagrams.! Round trip engineering as currently available for class diagrams sets a standard unlikely to be met immediately with behavior diagrams.! Model compilers will offer a chance for a lot of work.! New features will rely on development support tools for successful implementation.! Some features will likely be used in unanticipated ways.
Conclusion! Substantial additional meaning can now be on a behavior diagram in UML 2.! Will take time to integrate with working style of current UML users.! There will be stiff competition between different approaches.! Most users probably will not change their current diagram preference.! Additional information most useful initially for overseas development teams.
Discussion What features, if any, do you think your teams will use?