Structure
Description
A state machine consists in a set of states, a set of possible inputs and rules to trigger transitions to another state or to itself for any of the possible inputs.
States
A state denotes a given logical status. Each state machine shall have an initial state, which is the entry point for the state machine. When a state machine is executed it starts always in the initial state.

A state can have a set of actions associated when the state is activated (On Entry) and when deactivated (On Exit). All actions defined for the state changes are executed when entering or leaving the state.

Transitions
One or more transitions can be defined between two states. A transition is executed when the associated condition is met.
A transition aggregates a sender object, a condition and an action. If the condition is evaluated to true, the action is executed. Transitions are evaluated based on their logical order according to their definition.

CGI Studio provides a large number of standard events for its controls and a predefined set of conditions to choose from.

Set Transition Priority
When multiple transitions are connected to the same state, the priority of the transitions can be set in two ways. 遷移は、優先順位が高いものから順に条件一致確認がおこなわれ、条件に一致した遷移が実行されます。This function is useful when the conditions for the occurrence of multiple transitions are the same.
- Setting Transition Priority in State Machine Editor tree
Transitions are displayed in the tree view in the upper left corner of State Machine Editor. Transitions can be reordered by dragging and dropping them with the mouse. In the figure below, Transition_1 has the highest priority and Transition_3 has the lowest priority.

- Setting Transition Priority in Properties Panel
Transitions are displayed in Properties Panel under [ Transitions > Exit Transitions ]. Transitions are ordered from highest priority to lowest priority, and can be reordered using the [ Move Item Down ] and [ Move Item Up ] icons. In the figure below, ExitTransitions 0 (= Transition_1) has the highest priority and ExitTransitions 2 (= Transition_3) has the lowest priority.

State Machine Behavior
The state machine behavior is a standard CGI Studio behavior which allows to configure a state machine instance. The associated state machine will receive all the events of the associated node and could trigger further actions as they are defined in the state machine.
