If you want to get a state machine state as a string, for example, using an OCL-PS expression, use:
(#state-name).toString
Or, for example:
(#New).toString