Tutorials : UML modeling for information system architecture : Module 4: Create state diagrams
Module 4: Create state diagrams
Create a state diagram to show the events that cause a transition from one state to another state, in a class. Build a state diagram for the Reservation class.
The State diagram shows the events that cause a transition from one state of a class to another state. It is a network of states and events. State diagrams capture the class's received stimuli, responses, and actions. Each state receives one or more events, at which time the class transitions to the next state. The next state depends on the current state as well as the events.
Modeling a state diagram is useful for understanding the dynamic behavior of important classes in the system. By important, we mean a class that performs important tasks and can change state often based on system or business events. What is also implied is that you do not need to build a state diagram for every class in the system, just ones you would like to understand better.
Create a state diagram for the Reservation class, since it will be in various states, (provisionally booked, booked, created, destroyed, on hold, and so on). It is important to understand how long the class is in these states, and what events make the class change state.
Learning objectives
After completing the lessons in this module you will know how to:
Time required
This module should take approximately 20 minutes to complete.
Prerequisites
If users need to download data or prepare their environments before beginning the module, provide instructions for how to do this. If module prerequisites deviate from tutorial prerequisites, acknowledge this.
Lessons in this module
Lesson 4.1: Create a state diagram
Create a UML State diagram as a child diagram to the Reservation class.
Lesson 4.2: Determine the states and transitions for a class
Determine the states and transitions for a class for the sequence diagram Make Reservation.
Lesson 4.3: Add states to the state diagram
Draw a state diagram for the states of a reservation.
Lesson 4.4: Add actions to the state definition
Add actions to the Provisional state definition and specify the trigger event of a transition.
Next
Lesson 4.1: Create a state diagram
See also
Introduction: UML modeling for information system architecture
UML modeling for information system architecture