Part 2: Configuring the Global State Machine
Create a Global State Machine
When creating a new solution in SceneComposer, it already contains a Global StateMachine called "GlobalStateMachine". For training purposes I suggest to delete this existing StateMachine and create a new one.
A new StateMachine is created through the menu "State Machine" – "New State Machine…". This will open a dialog to configure the StateMachine's location to "/State Machines" and its name to "Main_StateMachine".


Select the Main_StateMachine in the Solution Explorer and make it a global StateMachine by checking the checkbox in the properties panel.


-
CGI Studio SceneComposer 3.10 only supports one global State Machine. For certain usecases multiple global State Machines are necessary.
Multiple global State Machines would be necessary to e.g. add an incoming call to the State Machine sample described here.
Add an Initial State and State for the Main Menu
Double-click the Main_StateMachine to open it in the State Machine Editor.
Drag and drop an Initial State and a single State for the MainMenu into the State Machine.Machine (if this hasn't been created automatically). Change the State's name to "MainMenu".

Connect the Initial State and the MainMenu State with a Transition. To do this, drag and drop the Transition Arrow onto the Initial State. Then you can draw an arrow to the MainMenu State. To create this transition, click onto the MainMenu State.

On the left side in State Machine Editor you can see the single Transition beneath the Initial State as well as beneath the MainMenu State.
When entering the MainMenu State, the MainMenu Scene has to be activated. To ensure that everything is rendered correctly, the Clear and Swap Scenes have to be activated too.
To configure activation of these scenes, select the MainMenu State. In the Properties panel click the "+" button next to "OnEntry" to create another OnEntry action. Select the action TransitionRequest. Click the magnifying glass icon to configure the Identifier.

Clicking the magnifying glass icon will open the Choose Item dialog, where you can choose the MainMenu Scene as Identifier.

Activate the swap and Clear Scene by adding two additional OnEntry actions.
The final configuration will look like this.

Resize MainMenu State

Add States for Navigation, Phone and Media
Drag and drop an initial State and 3 States (for Navigation, Phone and Media) onto the MainMenu State in the StateMachine Editor window. Name the States accordingly: Navigation, Phone, Media.

Configure the States - OnEntry and OnExit Actions


Similar steps are necessary for the OnExit action: Add an OnExit action by pressing the "+" on "OnExit", choose a Transition Request Action and select the Navigation Scene. However unlike the OnEntry action, the OnExit action shall Deactivate the Scene, which has to be configured too. To select the Identifier you can also copy the text from the OnEntry Identifier input field and paste it into the OnExit Identifier input field.
Additionally, when entering the Navigation State, the TextNode for Navigation has to be set to visible in the MainMenu Scene. We need to make it invisible again when exiting the Navigation State.

The screenshot below will help you locate the TextNode for the OnEntry1 and OnExit1 actions.

It is necessary to configure these OnEntry and OnExit actions for all three States in a similar way: The Media State has to configure TransitionRequests for the Media Scene, the Phone State has to configure TransitionRequests for the Phone Scene. The same applies for the EnableRendering actions.

Insert Transitions
Now, we need to establish the transitions between these states: One Transition goes from the initial state to the Navigation state, which will be the default entry point.
Between the 3 states Navigation, Media and Phone we need transitions in both directions:
It does make sense to start create the transitions into one direction (e.g. clockwise) and give them readable names (e.g. Navi_next). In a second step, create the transition into the other direction (counter-clockwise) and assign readable names (e.g. Navi_prev).

The diagram may get confusing with more transitions. To keep things in perspective, please be careful to choose meaningful names. You can also enlarge the states and move transitions around.

Configure State Transitions
The user should be able to navigate from one scene to the other using the left and right arrow key. This will be configured in the transitions.
All clockwise transitions (named *_next) will be configured for Key_RightArrow and all counter-clockwise transitions (named *_prev) will be configured for Key_LeftArrow.

-
You can select the Transition from within the State Machine Editor or from the list in the panel on the left.
Test the Configuration - Start the Player
The first part of our IVI configuration is done, it's time to save your solution and start the player.

Once the Player window is opened, the State Machine transitions to the Navigation State. Press Key_RightArrow to transition to the Media State. Press Key_RightArrow again to transition to the Phone State. You can also transition through the States in the other direction by pressing Key_LeftArrow.
