spring-statemachine icon indicating copy to clipboard operation
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!!!

Open Luckylau opened this issue 2 years ago • 1 comments

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 ?

Luckylau avatar May 05 '22 10:05 Luckylau

Where is the code that you use to restore?

AbstractAlao avatar Jun 04 '22 20:06 AbstractAlao