You can make a transition conditional by adding a handler which cancels the transition, from any of its lifecycle events (transition, event or state) and at any point (start, leave, enter, end).
To do this you can:
false
from the event handlercancel()
on the state machine instance