Faced the issue when my state action is called twice when expected behaviour is to run once.
Here is my state machine:
The problem is that for some reason method setCurrentState of AbstractStateMachine is called twice for state STATE_11.
Once from line 991
return setCurrentState(f, message, transition, false, stateMachine, null, fps.getForks());
and another one on line 999
return setCurrentState(toState, message, transition, true, stateMachine, null, targets);
And this leads to execution of handlers and actions twice.
Hi there!
Faced the issue when my state action is called twice when expected behaviour is to run once. Here is my state machine:
The problem is that for some reason method
setCurrentState
ofAbstractStateMachine
is called twice for state STATE_11. Once from line 991return setCurrentState(f, message, transition, false, stateMachine, null, fps.getForks());
and another one on line 999return setCurrentState(toState, message, transition, true, stateMachine, null, targets);
And this leads to execution of handlers and actions twice.I created a demo project with described behaviour: https://github.com/errd/spring-state-machine-example Please find in the project a test placed in
StateMachineTest
class.The problem persists only when I have fork/join in the submachine, with fork/join on the first level everything works as expected.
Am I missing something from configuration point of view? Thanks in advance!