spring-projects / spring-statemachine

Spring Statemachine is a framework for application developers to use state machine concepts with Spring.
1.52k stars 598 forks source link

releaseStateMachine should be automatically executed when the state reaches the end state #1074

Open royalzzz opened 1 year ago

royalzzz commented 1 year ago

Map<String, StateMachine<S, E>> machines in DefaultStateMachineService will become bloated with the increase of state machines. However, the release state machine method can only be called manually. If I use the timer to reach the final state, I cannot call this method through StateMachineService in OnStateChanged, because exception is thrown as follow. block()/blockFirst()/blockLast() are blocking, which is not supported in thread parallel-1

So, whats the best way to release machines in transition methods?