Behavioural state machine shows the different states through which a single object passes during its life in response to events, along with its responses and actions. Typically, behavioural state machine is not used for all objects but just to further define complex objects to help simplify the design of algorithms for their methods. The behavioural state machine shows the different states of the object and what events cause the object to change from one state to another.

State, event, and transition

The state of an object is defined by the value of its particular attributes and its relationships with other objects at a particular point in time. For example, a patient might have a state of new, current, or formal. An event is something that takes place at a certain point in time and changes a value or values that describe an object, which, in turn, changes the object’s state. A transition is a relationship that represents the movement of an object from one state to another state. A transition is a relationship that represents the movement of an object from one state to another state. Some transitions have a guard condition (boolean expression).

Elements of a behavioural state machine

State

A state is shown as a rectangle with rounded corners. It has a name that represents the state of an object.

Initial state

An initial state is a small circle, represents the point at which an object begins to exist.

Final state

Final state is shown as a circle surrounding a small filled circle. It represents the completion of an activity.

Transition

Indicates an object in the first state will entre the second state.

Frame

A frame indicates the context of the behavioural state machine.

Example


Back to parent node: Behavioural Modelling

System_Design_and_ModellingAnalysis_ModellingBehavioural_ModellingBehavioural_State_MachineISYS2110

Reference

  • Alan Dennis, David Tegarden, & Barbara Haley Wixom, 2012, Systems Analysis and Design with UML, 4th Edition, Wiley.