I've just started experimenting with the Spring state machine library. I have a simple state machine I'm trying to model, however I want to be notified whenever I provide an event that isn't a valid transition for the state the machine is currently in.
For example, if my state machine only allows transitioning from A to B if I receive event X, then I would like to be notified if the state is A but event Y is received because this is an error.
I know this would be possible by setting up transitions for all possible negative states and handling it there, but ideally there would be some way to only allow the transitions I explicitly define and alert me if anything else happens. Is this possible?