Statements
State
Dataset
CreationState
DynamicState
DeletionState
CreationDataState
DynamicDataState
DeletionDataState
StateAction
Transition
EventState
IgnoreEvent
CannotHappen
State Statement
State
This statement is the prelude to the following statements:
Dataset
CreationState
DynamicState
DeletionState
CreationDataState
DynamicDataState
DeletionDataState
Dataset Statement
State
Dataset:Initial
Text : Message
This statement specifies the state data items required by a state as a named dataset. It may be shared across several states. The state data are not attributes but, of course, may have values from attributes belonging to other classes. This statement is optional. It is used with the following statements:
CreationDataState
DynamicDataState
DeletionDataState
State data only exists within the context of the state and ceases to exist when the state finishes execution.
They can originate (or derive) from attributes but may also be carried on events from outside the domain (and ultimately the Real World).
CreationState Statement
State
CreationState:Activate
This statement declares a creation state that does not require state data. An entity can be created in a creation state synchronously either in a CreateAction statement or in the Object statement. It can also be created asynchronously by means of the GenerateEvent statement. More than one creation state per entity is allowed.
DynamicState Statement
State
DynamicState:Sending
This statement declares a dynamic state that does not require state data. It is entered upon receipt of an event. However, an entity can be created in the dynamic state synchronously using an Object statement. It can also be deleted synchronously in the dynamic state. More than one dynamic state per entity is allowed.
DeletionState Statement
State
DeletionState:Terminated
This statement declares a deletion state that does not require state data. It is entered upon receipt of an event. Upon completion of a deletion state the object is automatically deleted. Once an object is deleted, its identity can then be reused. An entity cannot be created or deleted in this state. Only one deletion state per entity is allowed. On the State Transition Diagram no outgoing transitions from a deletion state are shown.
CreationDataState Statement
State
CreationDataState:Activate:Initial
This statement is identical to the CreationState statement except that state accepts state data through a named dataset.
DynamicDataState Statement
State
DynamicDataState:Sending:Message
This statement is identical to the DynamicState statement except that state accepts state data through a named dataset.
DeletionDataState Statement
State
DeletionDataState:Terminated:Close
This statement is identical to the DeletionState statement except that state accepts state data through a named dataset.
StateAction Statement
State
DynamicState:Sending
StateAction
The StateAction statement introduces the state's action statements. If a state has no action statements this statement is excluded.
Transition Statement
State
DynamicState:Sending
Transition
All states must have a Transition statement. It introduces statements which describe what the entity's state machine must do when an event is received. All possible events an entity can receive must be listed under the statement.
EventState Statement
State
DynamicState:Sending
Transition
EventState
Wait -> Waiting
Die -> Terminated
This statement specifies valid event transitions that result in an entity' change in state.
IgnoreEvent Statement
State
DynamicState:Sending
Transition
IgnoreEvent
Wait
The IgnoreEvent statement lists those events that can be ignored while in the state.
CannotHappen Statement
State
DynamicState:Sending
Transition
CannotHappen
Born
Die
The CannotHappen statement specifies the events that must not occur while in the state.
It should not be possible to receive these events but if they do occur it means that something catastrophic has gone wrong with the model and may leave the system as a whole in an error state. Usually the system can't recover and a reboot, self destruct or detonation is required.
|