Professional Documents
Culture Documents
Statechart Diagram
Prepared by
Huda Amin Maghawry
Information Systems
Source
Mastering UML with Rational Rose 2002
Statechart Diagram
• It includes information about
• The various states in which an object can exist
• How the object transitions from one state to another
• How the object behaves differently in each of the
states
Source
Mastering UML with Rational Rose 2002
Statechart Diagram
. cont
Source
Mastering UML with Rational Rose 2002
Transitions
. cont
• Guard condition:
Source
Mastering UML with Rational Rose 2002
Transitions
. cont
• Action:
Source
Mastering UML with Rational Rose 2002
Nested States
• To reduce number of arrows in diagram you can nest one
or more states inside another
Source
Mastering UML with Rational Rose 2002
Nested States
. cont
Source
Without nested states
Mastering UML with Rational Rose 2002
Nested States
. cont
Superstate
Suberstate
Source
With nested states
Mastering UML with Rational Rose 2002
State History
• At times, you may need the system to remember which
state it was last in
• If you have three states in a superstate and then leave
the superstate, you may want the system to remember
where you left off inside the superstate
Source
Mastering UML with Rational Rose 2002