9.2. State Machine

A lifecycle is formally expressed as a state machine, comprising:

  • States. Each state represents a stage in the lifecycle of a typical instance of the class.

  • Events. Each event represents an incident or indication that a progression is happening.

  • Transitions. A transition rule specifies what new state is achieved when an object in a given state receives a particular event.

  • Procedures. A procedure is an activity or operation that must be accomplished when an object arrives in a state. Each state has its own procedure. Procedures comprise actions.

The state machine is represented as a statechart diagram, as defined first in [2]. That is, the statechart diagram is a representation of the underlying semantics defined by the state machine. ...

Get Executable UML: A Foundation for Model-Driven Architecture now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.