spring-statemachine
spring-statemachine copied to clipboard
when i persist the statemachine which do not config event, laterly restore it and run , the statemachine will be running and can't stop!!!
my config like this : ` @Override public void configure(StateMachineStateConfigurer<String, String> states) throws Exception { states.withStates() .initial("S1") .state("S2") .end("S3") .and() .withStates() .parent("S2") .initial("S2_1") .choice("S2_2") .state("S2_3") .state("S2_4") ; }
@Override
public void configure(StateMachineTransitionConfigurer<String, String> transitions) throws Exception {
transitions.withExternal()
.source("S1").target("S2")
.and().withExternal().source("S2_1").target("S2_2")
.and().withChoice().source("S2_2").first("S2_3", context -> true).last("S2_4")
.and().withExternal().source("S2_3").target("S3");
}`
i use some way perist the statemachine at S2_1 state, laterly i restore from redis and run it , i find the machine will be always running and can't stop ; why does it happen ?
Where is the code that you use to restore?