Sate Configuration
CGI Studio enables application logic through an integrated state machine model. State machines, combined with controls and behaviors, support the construction of complex application logic without programming.
This section describes how to set up transitions between scenes using state machines. The ultimate goal is to trigger scene transitions by clicking on specific nodes within a scene.
Displaying the State Machine Editor
The state machine editor is displayed by the following operations
- Expand [ Solution>State Machines ] in the Solution Explorer.
- "State Machines" is expanded and "GlobalStateMachine" is displayed.

- "State Machines" is expanded and "GlobalStateMachine" is displayed.
- Double-click "GlobalStateMachine".
- The State Machine Editor panel will appear.
- The State Machine Editor panel can also be displayed by selecting [ State Machine > State Machine Editor ] on the menu bar from "View".
With the State Machine Editor panel displayed, check the Properties panel and make sure that [ Is Global ] is checked. If it is not checked, check it.
GlobalStateMachine consists of Initial State (circle icon), Transition (arrow), and State (rectangle) by default.
Initial State is the entry point for the state machine. State represents a certain logic status and is associated with a series of actions when transitioning into a State (enabled) or transitioning out of a State and moving to another State (disabled).
Each action defined for a State change is performed when the State is enabled/disabled.

State configuration
To perform screen transitions, set the State. This operation is performed after the State Machine Editor is displayed in Displaying the State Machine Editor operation.
- Click State on the State Machine Editor panel.
- The properties of the selected State are displayed in the Properties panel.
- The properties of the selected State are displayed in the Properties panel.
- In the Properties panel, change the [ Name ] of the General category to "Car_Cluster".
- The name of the State on the State Machine Editor panel screen changes to "Car_Cluster".

- The name of the State on the State Machine Editor panel screen changes to "Car_Cluster".
- With "Car_Cluster" selected, from the lower left of the State Machine Editor panel, click [ Fusion... ].
- Switch to the Fusion panel and the Fusion diagram for "Car_Cluster" is displayed.
- The Transition Request Fusion node is connected to the connector (On Entry Actions) in the upper right corner of the Car_Cluster Fusion node.
- [ RequesType ] is set to "Active".

- Switch to the Fusion panel and the Fusion diagram for "Car_Cluster" is displayed.
- Click on the Select item icon to the right of the [ Identifier ] in the Transition Request Fusion node.
- [ Choose Item ] dialog box appears.

- [ Choose Item ] dialog box appears.
- Select [ Solution>Scenes>Car_Cluster ] from the list on the right side of the dialog and press [ OK ] button.
- With this setting, the "Car_Cluster" scene will be enabled when transitioning to this State "Car_Cluster".

- With this setting, the "Car_Cluster" scene will be enabled when transitioning to this State "Car_Cluster".
- Drag the connector (On Exit Actions) in the lower right corner of the Car_Cluster Fusion node, move the mouse, and release left click anywhere.
- [ Select Behavior ] dialog appears.

- [ Select Behavior ] dialog appears.
- Enter "Transition Request " in the search field at the top of the dialog.
- The list of behaviors in the dialog is narrowed down to [ Action > Transition > Transition Request ].
- The list of behaviors in the dialog is narrowed down to [ Action > Transition > Transition Request ].
- Double-click "Transition Request".
- A Transition Request Fusion node is linked to the "On Exit Actions" connector of the Car_Cluster Fusion node.

- A Transition Request Fusion node is linked to the "On Exit Actions" connector of the Car_Cluster Fusion node.
- The following settings are made for the Transition Request Fusion node connected to the "On Exit Actions" connector.
- With this setting, the Car_Cluster scene is disabled when transitioning from this State "Car_Cluster".
RequestType Deactivate Identifier Solution>Scenes>Car_Cluster
- With this setting, the Car_Cluster scene is disabled when transitioning from this State "Car_Cluster".
- Click the up arrow icon in the upper right corner of the Fusion panel to switch the display to the State Machine Editor.
Adding and configuring "State"
- Click on the "Car_Cluster" State on the State Machine Editor and select [ Copy ] from the context menu.

- Anywhere in the state machine editor, bring up the context menu and select [ Paste ].
- A State named "Car_Cluster_1" will be added.
- A State named "Car_Cluster_1" will be added.
- Click on "Car_Cluster_1" on the State Machine Editor panel screen.
- The properties of "Car_Cluster_1" will appear in the Properties panel.
- The properties of "Car_Cluster_1" will appear in the Properties panel.
- In the Properties panel, change the [ Name ] of the General category to "Car_Status".
- The name of State on the State Machine Editor panel changes to "Car_Status".
- The name of State on the State Machine Editor panel changes to "Car_Status".
- With "Car_Status" selected, from the lower left of the State Machine Editor panel, click [ Fusion... ].
- Switch to the Fusion panel and the Fusion diagram for "Car_Status" is displayed.
- The connectors on the right side of the Car_Status Fusion node (On Entry Actions/On Exit Actions) are connected to the Transition Request Fusion node, respectively.
- Switch to the Fusion panel and the Fusion diagram for "Car_Status" is displayed.
- Set the Transition Request as follows
On Entry Actions RequestType Activate Identifier Solution>Scenes>Car_Status On Exit Actions RequestType Deactivate Identifier Solution>Scenes>Car_Status - Repeat the step 1 through step 6 above, add another State and make the following settings.
Name Incoming_Call On Entry Actions RequestType Activate Identifier Solution>Scenes>Incoming_Call On Exit Actions RequestType Deactivate Identifier Solution>Scenes>Incoming_Call - After all steps are completed, the state machine editor will look like below figure.

The above operation completes the creation of States for transitions between the three scenes. The next step is to set up transitions between each State.