What this process actually does is generate four classes. The main class is named ConWHSVehicleTableInspStateMachine, which is a concatenation of the table's name and the state machine's name. The other three classes are all prefixed with this class, and allow typed date to be passed to the delegates that were written into this class.
The fact we have a state machine does not prevent the user from manually changing the status field's value. It also does not stop us from manually changing the status in code. So the restriction on the final status being final is only true when using the state machine.
There are two ways in which we can use the state machine:
- Attach to workflow events
- Use with menu items added to a form
We will explore these in the following recipes.