Switch to string state for Order
Use constant for transition names
Use constant for graph names
Merge pull request #1426 from winzou/state-machine

Use Finite State Machine