© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Advanced UML State Diagrams.

Slides:



Advertisements
Similar presentations
State Diagram 1. State diagram: Shows the behavior of one object. They describe all of the possible states that a particular object can get into and how.
Advertisements

State Charts Mehran Najafi. Reactive Systems A reactive, event-driven, object is one whose behavior is best characterized by its response to events dispatched.
Nested state diagrams:Problems with flat state diagram
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
State Transition Diagrams Chapter 13
UML State chart/machine diagram State machine diagram is a behavior diagram which shows discrete behavior of a part of designed system through finite state.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Information System Design IT60105
Slide 10B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
State Diagram. What is State Diagram?  State diagram is used to show the state space of a given class, the events that cause a transition from one state.
1 CS 691z/791z Topics in Software Engineering Chapter 20: Advanced Statechart Modeling [Arlow and Neustadt, 2002] March 8, 2007.
1 CS/CPE 426 Senior Projects Chapter 21: State Machines Chapter 22:Advanced State Machines [Arlow and Neustadt 2005] March 24, 2009.
State Change Modelling. Aim: To introduce the concept and techniques for describing the changes in state that may occur to an object in its lifetime.
Advanced Behavioral Modeling
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 10: Statecharts.
Slide Slide 1 Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley. Created by Tom Wegleitner, Centreville, Virginia Section 4-3.
SE-565 Software System Requirements More UML Diagrams.
Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions.
Interaction Modeling. Sequence Models  There are two kinds of sequence models: scenarios and sequence diagrams  A scenario is a sequence of events that.
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Chapter 10 State Machine Diagrams
UML A CTIVITY D IAGRAMS 1 Dr. Hoang Huu Hanh, OST – Hue University hanh-at-hueuni.edu.vn.
Slide 16B.51 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering.
Business Informatics Group Institute of Software Technology and Interactive Systems Vienna University of Technology Favoritenstraße 9-11/188-3, 1040 Vienna,
NJIT Modeling Behavior in State Chart Diagrams Chapter 29 Rafael Mello.
Guide to State Transition Diagram. 2 Contents  What is state transition diagram?  When is state transition diagram used?  What are state transition.
Session 22 Modeling the Extended Features of the Statechart Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 27, 2011 Presented.
Activity diagrams. Introduction ● Activity diagrams are a behavioural model that represent the dynamics of the system. ● An activity diagram is essentially.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Advanced UML Class Diagrams.
Information System Design IT60105
Software Engineering Design & Modeling Statechart Diagram.
1 Kyung Hee University Statecharts Spring Kyung Hee University Specifying Objects’ Behaviour  Interaction diagrams show message-passing behaviour.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML Activity Diagrams.
Chapter 11 Activity Diagrams. 2 “Activity diagrams are a technique to describe procedural logic, business processes, and work flows” - M. Fowler An activity.
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part VI: Design Continuous Activity Diagams State Diagrams.
12 Chapter 12: Advanced Topics in Object-Oriented Design Systems Analysis and Design in a Changing World, 3 rd Edition.
Sections © Copyright by Pearson Education, Inc. All Rights Reserved.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML State Diagrams.
States.
CS3773 Software Engineering Lecture 06 UML State Machines.
Using VisSim State Charts Visual Solutions, Inc. 487 Groton Road, Westford MA USA (800) VISSIM-1
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 26. Review UML behavioral Diagrams – Sequence diagram.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 10: Statecharts.
Activity Diagramming by Andrzej Rosolski Stanisław Gliniewicz.
Interaction Models (2): Activity Diagrams Extracted from textbook: Object Oriented Modeling and Design with UML M. Blaha, J. Rumbaugh.
® IBM Software Group © 2009 IBM Corporation Module 11: Creating State Machine Diagrams Essentials of Modeling with IBM Rational Software Architect V7.5.
UML Review: State Machines. Sept. 17, 2003Lecture 5: CS660 Fall Overview States Transitions Activities Modeling object lifeline Creating well-structured.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML Activity Diagrams.
Business Process and Functional Modeling
ACTIVITY DIAGRAMS 《UML面向对象建模基础》.
Information Delivery Manuals: Process Mapping
State Machine Diagram.
State Machine Diagrams
Building System Models for RE
Activity and State Transition Diagram
Visit for more Learning Resources
Advanced state modeling
State Machine Diagrams
Activity Diagrams.
UML Activity Diagrams & State Charts
States.
CS/CPE 426 Senior Projects
Advanced State Chart diagrams
Chapter 6 Control Statements: Part 2
CS/CPE 426 Senior Projects
States.
CS 791Z State Machines & Advanced State Machines
Behavioral Diagrams P. P. Mahale
Interaction Models (2): Activity Diagrams
Copyright © 2015, 2012, 2009 Elsevier Inc. All rights reserved.
Presentation transcript:

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Advanced UML State Diagrams

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 2 Objectives  To present advanced features of the UML state diagram notation  To illustrate uses of state diagrams with advanced features  To present heuristics for making good state diagrams with advanced features

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3 Topics  Concurrent composite states  Compound transitions  History and deep history states  More state diagram heuristics

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4 Concurrent Composite States  The regions in a concurrent composite state nested state compartment contain state diagrams that execute in parallel.  One state in each region is entered when the concurrent composite state is entered.  One state from each region is always among the joint concurrent states until the concurrent composite state is exited.  Events cause transitions in each concurrent region to occur simultaneously.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 5 Concurrent Composite State Example

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 6 Entering Concurrent Composite States  Make a transition to the concurrent composite state boundary The initial state in each region becomes the current state  Make a transition to individual states in different regions Main transition goes to a fork bar Transitions to individual state come from the fork bar A region without a state targeted by a transition begins in its initial state

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 7 Entering Selected Concurrent States: Illustration

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8 Leaving Concurrent Composite States  Make a transition from the concurrent composite state boundary For a non-completion transition, all concurrent sub-states are exited immediately For a completion transition, the current state must be a final state in every concurrent region  Make a transition from one or more concurrent sub-states Coordinated transitions can go to a join bar All other sub-states are exited immediately

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9 Leaving Selected Concurrent States: Illustration

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10 Using Concurrent Composite States  Any concurrent composite state can be represented by a diagram with only simple states, but it will have many more states than the concurrent composite state.  Concurrent composite states thus simplify diagrams.  On the other hand, diagrams with concurrent composite states are often hard to understand.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11 Compound Transitions  Transitions from multiple sources or to multiple targets with common transition strings Transition arrows from multiple sources may converge on a transition junction point from which a single arrow goes to a target  Common transition string stated only once A transition arrows with a single event string may end at a junction point from which emerge arrows with mutually exclusive guards to multiple targets  Symbol is a filled circle

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 12 Compound Transition Example

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 13 History States  A history state is a pseudo-state indicating that the sub-state last active when a composite state was exited should be reentered. Symbol is a circled H  Many common devices have persistent state, so this is a useful modeling feature.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 14 History State Example

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 15 History State Restrictions  May only appear in a region of a composite state  Transitions may only enter a history state from outside the composite state  May have at most one unlabeled outgoing transition to a peer state Indicates the default reentered state if the composite state has not yet been entered  History states may not have internal transitions, nested compartments, etc.  History state is forgotten if the current inner state becomes a final state.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 16 Deep History States  A history state indicates reentry to a state at the same nesting level. States at lower nesting levels are entered as usual (initial states).  A deep history state is a pseudo-state indicating that the states last active at every nesting level when a composite state was exited should be reentered. Symbol is a circled H*

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 17 Deep History State Example

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 18 More State Diagram Heuristics 1  Avoid concurrent composite states, especially those with synch states.  Designate an initial state in every concurrent region of a concurrent composite state.  Check that transitions to several concurrent sub-states go through a fork.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 19 More State Diagram Heuristics 2  Check that arrows connected to transition junction points are properly labeled.  Check that at most one unlabeled arrow emanates from each history state.  Check that every sequential state diagram containing a history state has an initial state.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 20 Summary  State diagrams can show concurrency concurrent composite states, but these are governed by somewhat complex rules and hard sometimes hard to understand.  Compound transitions allow combination of several transitions with common transition strings into one.  History and deep history states allow state diagrams to model persistent states.