Spring state machine invalid transitions
up vote
0
down vote
favorite
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?
spring state-machines finite-state-machine spring-statemachine
add a comment |
up vote
0
down vote
favorite
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?
spring state-machines finite-state-machine spring-statemachine
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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?
spring state-machines finite-state-machine spring-statemachine
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?
spring state-machines finite-state-machine spring-statemachine
spring state-machines finite-state-machine spring-statemachine
asked yesterday
wearebob
156
156
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53401774%2fspring-state-machine-invalid-transitions%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown