Anda di halaman 1dari 6

State Machine Diagram Sample

State Machine diagram can show the different states of an entity also how an entity responds to various events by
changing from one state to another.

Choice pseudo state


A choice vertices which, when reached, result in the dynamic evaluation of the guards of the triggers of its outgoing
transitions. This realizes a dynamic conditional branch. It allows splitting of transitions into multiple outgoing paths
such that the decision on which path to take may be a function of the results of prior actions performed in the same
run-to-completion step.

Composite state
A composite state is either a simple composite state (with just one region) or an orthogonal state (with more than one
region).

1
Entry point
An entry point pseudostate is an entry point of a state machine or composite state. In each region of the state
machine or composite state it has a single transition to a vertex within the same region.

Exit point
An exit point pseudostate is an exit point of a state machine or composite state. Entering an exit point within any
region of the composite state or state machine referenced by a submachine state implies the exit of this composite
state or submachine state and the triggering of the transition that has this exit point as source in the state machine
enclosing the submachine or composite state.

Final state
A special kind of state signifying that the enclosing region is completed. If the enclosing region is directly contained in
a state machine and all other regions in the state machine also are completed, then it means that the entire state
machine is completed.

2
History, Deep Pseudo state
A deepHistory represents the most recent active configuration of the composite state that directly contains this
pseudostate; e.g. the state configuration that was active when the composite state was last exited.

History, Shallow pseudo state


A shallowHistory represents the most recent active substate of its containing state (but not the substates of that
substate). A composite state can have at most one shallow history vertex.

Initial pseudo state

An initial pseudostate represents a default vertex that is the source for a single transition to the default state of a
composite state. There can be at most one initial vertex in a region. The initial transition may have an action.

Junction pseudo state


A junction vertices are semantic-free vertices that are used to chain together multiple transitions. They are used to
construct compound transition paths between states.

3
Region
A region is an area that contains states and transitions. It can be an orthogonal part of either a composite state or a
state machine.

Orthogonal Regions and Concurrency


When a state contains two or more regions, the regions are said to be orthogonal. Regions 1 and 2 in the diagram
below are orthogonal.

4
Simple state

A simple state is a state that does not have substates, i.e. it has no regions and it has no submachine state machine.

State list
A state models a situation during which some (usually implicit) invariant condition holds. The invariant may represent
a static situation such as an object waiting for some external event to occur.

Terminate node
Entering a terminate pseudostate implies that the execution of this state machine by means of its context object is
terminated. The state machine does not exit any states nor does it perform any exit actions other than those
associated with the transition leading to the terminate pseudostate.

Submachine state
A submachine state specifies the insertion of the specification of a submachine state machine. The state machine that
contains the submachine state is called the containing state machine. The same state machine may be a submachine
more than once in the context of a single containing state machine.

5
Transition
A transition is a directed relationship between a source vertex and a target vertex. It may be part of a compound
transition, which takes the state machine from one state configuration to another, representing the complete response
of the state machine to an occurrence of an event of a particular type.

Anda mungkin juga menyukai