-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resetting spring state machine results in infinite loop #1011
Comments
My gut says that starting the machine when resetting is the culprit: Lines 887 to 890 in af4cfc4
|
Added a listener for more info and for some reason, at some point, state changes from.
|
I would agree that this is at least a use case that exposes the issue. I encountered the same behavior when using a Issue SettingConsider a simple Statemachine with 2 states and 1 triggerless transition:
The use case here is:
Note that use case point 1.1 is meant for reference. The point of interest is 1.2 where the Statemachine is started as part of the persister's restore procedure: Lines 66 to 73 in cf4eb2f
Version SpecificsThe issue mainly concerns Spring Statemachine Core Issue DescriptionThe method I attached a MWE with a test for reference (built with Gradle There are 2 test cases, one for each point from the use case as mentioned above. Both Statemachine versions succeed with point 1.1 but fail 1.2: Version
|
Version Lines 184 to 194 in 4495c7d
And looks like on some point (while performing stopReactively) machine returning lastState instead of current state and machine goes back to infinite loop and never finish. |
I am exploring Spring state machine and was testing a scenario where state machine would run to completion after resetting from a specific state but it runs in an infinite loop. The below code is enough to reproduce the issue.
Basically, there is one state machine that on event
e1
will transition froms1
tos2
and then it will transition tos3
ands4
(triggerless transition). I want to make this state machine run froms2
to completion, but it ends up in a infinite loop, executing (and printing)s3 action
What am I missing here?
Note: posted on StackOverflow too
The text was updated successfully, but these errors were encountered: