I think it would be less barbaric to use an enumtype for the state of the machine.
See here: http://www.enel.ucalgary.ca/People/Norman/enel315_winter1997/enum_types/