Book contents
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 General Diagramming Guidelines
- 3 Guidelines for Common UML Modeling Elements
- 4 UML Use-Case Diagrams
- 5 UML Class Diagrams
- 6 UML Package Diagrams
- 7 UML Sequence Diagrams
- 8 UML Communication Diagrams
- 9 UML State Machine Diagrams
- 10 UML Activity Diagrams
- 11 UML Component Diagrams
- 12 UML Deployment Diagrams
- 13 UML Object Diagrams
- 14 UML Composite Structure Diagrams
- 15 UML Interaction Overview Diagrams
- 16 UML Timing Diagrams
- 17 Agile Modeling
- Bibliography
- Index
9 - UML State Machine Diagrams
Published online by Cambridge University Press: 17 December 2010
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 General Diagramming Guidelines
- 3 Guidelines for Common UML Modeling Elements
- 4 UML Use-Case Diagrams
- 5 UML Class Diagrams
- 6 UML Package Diagrams
- 7 UML Sequence Diagrams
- 8 UML Communication Diagrams
- 9 UML State Machine Diagrams
- 10 UML Activity Diagrams
- 11 UML Component Diagrams
- 12 UML Deployment Diagrams
- 13 UML Object Diagrams
- 14 UML Composite Structure Diagrams
- 15 UML Interaction Overview Diagrams
- 16 UML Timing Diagrams
- 17 Agile Modeling
- Bibliography
- Index
Summary
UML state machine diagrams depict the dynamic behavior of an entity based on its response to events, showing how the entity reacts to various events based on its current state. Create a UML state machine diagram to
■ explore the complex behavior of a class, actor, subsystem, or component;
■ model real-time systems.
General Guidelines
Create a State Machine Diagram When Behavior Differs Based on State
If an entity, such as a class or a component, exhibits the same sort of behavior regardless of its current state, then drawing a UML state machine diagram will be of little use. For example, a SurfaceAddress class is fairly simple, representing data that you will display and manipulate in your system. Therefore, a UML state machine diagram would not reveal anything of interest. On the other hand, a Seminar object is fairly complex, reacting to events such a enrolling a student differently depending on its current state, as you can see in Figure 38.
Place the Initial State in the Top Left Corner
An initial state is modeled with a filled in circle, as you can see in Figure 38. Placing an initial state in the top left corner reflects the way that people in Western cultures read. Another good option is to place the initial state at the top of your diagram in the center.
- Type
- Chapter
- Information
- The Elements of UML™ 2.0 Style , pp. 103 - 112Publisher: Cambridge University PressPrint publication year: 2005