Add state machine to event