Initial states
When a state machine starts, it enters the initial state first. A machine can only have one top-level initial state; if there were multiple initial states, the machine wouldn’t know where to start!
In our video player, paused is the initial state because the video player is paused by default and requires user interaction to start playing.
View this machine in the Stately Studio.
Change the initial state​
Each new machine or parent state will set the first new state as its initial state by default.
On the canvas​
- Select the state you wish to make the new initial state.
- Right-click the state to open the edit menu.
- Choose Mark as initial state from the edit menu.
Using the state Details panel​
- Select the parent state or parent machine.
- Open the state Details panel from the right tool menu.
- Choose the desired initial state from the Initial state dropdown menu.