When it is in the Idle state, the state machine is quite simply waiting for an event, in the form of a coin, to arrive.
A state is a discrete stage in a business transaction. The state begins with the running of any defined entry action. The state will then listen for an event to occur, and then choose the path appropriate to the event. If there is an exit action it will run before the State Machine transitions to the next state.
This application has four states, an Initial state which is the starting point of any State Machine, two Simple states which are Idle and Depositing, and a Final state which is where a State Machine comes to a normal end.
A transition is used to move from one state to another. A transition will evaluate its conditions to determine if control should flow through it. If control does flow through it then it will also run any defined action.
To configure the Idle state, perform the following steps: