State machines are a new concept in SCM and are a very welcome feature. Previously, the control of status fields was handcrafted in code, which could often be hard to read as there was no obvious pattern to follow. Having said that, we will always look at a standard example that's similar to our case and use that idea. This is good practice, as it is good to seek examples in standard code. Using standard code as a pattern often helps other developers understand the code we have written, and, if we can't find a pattern to follow, it might suggest that we rework our technical solution so that we can.
State machines allow us to define how the status transitions from an initial state to its final state through metadata. These rules are then enforced by code that the state machine will generate.
There is a restriction, though: there must be one initial state...