Architecting and designing : UML 2.0 Lite : UML models : UML state diagram : State
  
State
A state symbol represents a state that an object is in at a particular time. While in the state, the object satisfies some condition, performs some action, or waits for some event.
Actions (and activities)
You may specify the actions and activities that are performed while the modeled element is in a state. An action is an executable atomic computation; atomic in that it cannot be interrupted by an event and therefore runs to completion. This contrasts it to an Activity, which may be interrupted by other events. Actions may include operation calls, the creation or destruction of another object, or the sending of a signal to another object.
When an action Is performed
For each action, you may specify when it is performed, as follows:
On Entry Action: An action performed upon entry to the state. On the state symbol, it is preceded by the label 'entry/' .
On Exit Action: An action performed upon exit from the state. It is displayed on the state symbol preceded by the label ' exit/ ' .
Do Activity: An ongoing activity that is performed as long as the object is in the state or until computation specified by the action expression is completed. It is displayed on the state symbol preceded by the label 'do/'.
Action type
An action may be of type Action, for which the properties above apply, or of type Send event.
Send Event: If it is a send event, you may specify the name of the event, its arguments, and its target in the Send Event, Send Arguments, and Send Target fields of the Send Event tab of the Action's definition dialog.
Methods
For each action, you may specify the method that is performed by the class.
1 Select the Methods tab of the Action definition. Click Choices next to the (Method)list box, to open the Select and Drag dialog. A list of methods appears.
2 Drag a method into the Method list.
You cannot type a new method name, you must select from the list.
Internal transitions
A transition that is handled without causing a change in state is considered an internal transition. These are equivalent to self-transitions, except that the state is not exited or re-entered, and therefore the entry and exit actions are not re‑performed.
An internal transition contains all of the same properties of a normal Transition.
The internal transition is displayed on the state symbol, preceded by the name of the event that triggers the transition; for example:
'event name'/
State variables
You may describe the state that an object is in by the values of its attributes. For example, when a traffic light is in the state of go, its light color is green; when it is in the state of stop, its light color is red.
For every state, you may specify one or more state variables, and for each state variable, specify the following information:
Variable
For every state variable, you may specify the actual class attribute that is being affected. To add a class attribute to the variable field, do one of these:
To enter a class attribute to the Variable cell in the State Variables grid, right‑click the Variable cell of a State Variable, and then click Choices. In the Select and Drag dialog, drag an attribute into the Variable cell. (You cannot type new class attributes in the grid, you can only drag existing attributes).
You may also highlight the State Variable in the gird, and click Define to open its full definition. In the definition dialog for the State Variable, add an attribute to the Variable (Class Attribute) field by clicking Choices, and then drag an attribute into the Variable (Class Attribute) field. (You cannot type new class attributes in the field, you can only drag existing attributes.)
Value
You may specify the value of the attribute while the class is in this state. For example, if a traffic light is in the state of go, its value would be “green”.
See also
UML state diagram