1. In a representation of a computer implemented state machine stored in a computer system, the representation having states and transitions, a method comprising: detecting an occurrence of an event; processing the state machine with multiple-stage processing in response to the detecting of the occurrence of the event, the multiple-stage processing including a first processing stage and a second processing stage for processing the state machine, the state machine comprising a plurality of states organized in a hierarchy formed of one or more superstates and one or more substates; determining if a valid early transition exists within the representation of the state machine, the first processing stage processing one or more early transitions and ignoring one or more late transitions; if the valid early transition exists, processing the valid early transition during the first processing stage; if a valid early transition does not exist, determining if a valid late transition exists within the representation of the state machine the second processing stage processing one or more late transitions and ignoring one or more early transitions; and if the valid late transition exists, processing the valid late transition during the second processing stage.