The following shows a description of a detailed state model.
A state model includes: a set of events (
In addition to operations, events also include timeouts corresponding to Timers expiry. Timers are associated with states. They count the time elapsed while the system sits in a particular state.
A State situation is defined as a set of characteristic conditions.
A characteristic condition is either a condition (i.e. a valuation of a domain entity) or a timeout condition.
Two states are identical if they have the same characteristic conditions.
States in the example are listed with their set of characteristic conditions. As an example, state 4 characteristic conditions are {Card is inserted, Alarm is System Status, status is irregular, PMSystem is ON}.
Notice that all domain entities always have a value that may be explicit or unknown, in a given state. As an example, since attribute Display of the PMSystem doesn't have an explicitly defined value in state 4, its implicit value is unknown value.
A timeout condition reflects the 'relevancy' of the fact that a timer expired. As an example, timeout condition Timer0:20 second that characterizes state 5 means that timer Timer0 that was set for 20 seconds has expired, and that information is 'relevant'.
A state is a sub-state of a state
(its super-state), if its characteristic conditions include those of
in the logical sense. As an example, state 1 in
the state model is a super-state of
state 2. State 2 characteristic
conditions include state 1 characteristic conditions.
A state may have more than one direct super-states. State 17 which direct super-states are states 9 and 16 is an example of such a state.
A transition includes:
5---[eject card]-->6
describes a transition from
state 5 to 6 on event eject card.
Any transition starting from a state s also applies to all
the sub-states of s. As an example transition
1---[press cancel button]-->23
from state 1 applies to all
sub-states of state 1 (all the other states in the state model).