Overview

A Protocol State Machine diagram is, in general, a more narrowly defined State Machine diagram. It is always defined in the context of a classifier. It specifies which Operations of the classifier can be called, in which State, and under which condition, thus specifying the allowable call sequences on the classifier's operations.

The Protocol State Machine presents the possible and permitted Transitions on the instances of its context classifier, together with the Operations that carry the Transitions.

In this manner, an instance lifecycle can be created for a classifier, by specifying the order in which the Operations can be activated and the States through which the instance progresses during its existence.

Purpose

The Protocol State Machine diagram is created for use with the Protocol State Machine and the Protocol Transitions. It limits the scope of the State Machine diagram to show only the transitions that trigger the state changes. 

Usage

A Protocol State Machine diagram can be used to:

  • show different stable class states of objects that could exist for some time
  • explain how objects could change their states over time

Summary

Protocol State Machine diagrams are valuable because they:

  • place the focus on what it takes to legally change an object
  • reveal conditions that ensure the integrity of the object while it is being manipulated by other objects in the system
  • keep the designer from focusing on the implementation details before resolving the integrity issues. 

Example of a Protocol State Machine diagram

Related pages