A simple state machine implementation. We can create states, add transitions and start the state machine. We can start each state machine in a seperate thread.
- Create states
- Create a state machine object
- Specify init state and final state
- Add transitions
- Start the state machine and let it reach the final state.