A State represents a significant condition in the life of a Block. State Machines describe how a Block transitions from one State to another and defines what logical behaviour (Activities/Actions owned by the Block) are performed when entering or exiting a State. This type of diagram is great for describing an integrated view of a Block’s behaviour because all the individual threads of behaviour, defined for a Block using Activity Diagrams, are integrated into a single executable model using the stm diagram.
An example stm is:
The symbols available in stms are:
If you want to see the referenced element in the EVENT frame follow the steps shown in the following figure.The @REF_ID element is cross referenced to the State element by an item reference relationship. The following figure shows the referenced element in the sidebar and displayed in the bottom compartment of the State symbol.
Signal events indicate that a new asynchronous message corresponding to a signal has arrived. A signal event may be accompanied by a number of arguments that can be used in the transition effect.Call events indicate that an operation of the state machine's owning block has been requested. A call event may also be accompanied by a number of arguments. An operation is represented by an «activity» or «action» element.Change events indicate that some condition has been satisfied (normally that some specific «valueType» has changed). The keyword When is used for a change event.Time events indicate either that a given time interval has passed since the current state was entered (after), or that a given instant of time has been reached (at).
The symbols along with their default stereotypes, referenced elements, stereotype frames and cross reference link attributes are: