Chapter 7. State Diagrams

This chapter focuses on state diagrams, also known as statechart diagrams, which depict the lifecycle of elements that make up a system. First, I introduce state diagrams and how they are used. Next, I go over states and their details. Finally, I discuss transitions between states and their details. Many details of state diagrams that were not fleshed out in Chapter 2 are more fully elaborated here, and throughout the chapter, I include suggestions relating to state diagrams.

State modeling is a specialized type of behavioral modeling concerned with modeling the lifecycle of an element. You usually apply state modeling in conjunction with interaction and collaboration modeling (Chapter 6) to explore the lifecycle of interacting and collaborating elements.

States

As discussed in Chapter 2, as elements communicate with one another within a society of objects, each element has a lifecycle in which it is created, knows something, can do something, can communicate with other elements to request processing of those other elements, can have other elements communicate with it to request processing of it, and is destroyed. A state is a specific condition or situation of an element during its lifecycle. Define the states for your elements. The current state of an element is called its active state, and the element is said to be “in” that state. There are various types of states, including simple, initial, and final states. The next few sections discuss these different ...

Get Learning UML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.