-
Notifications
You must be signed in to change notification settings - Fork 627
State machine sub-regions do not resume from last state after restore from persistence #811
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
Comments
Bump @jvalkeal, do you know if there is a known workaround for this? |
@jvalkeal Could u update on this issue. I am facing the same issue in implementing SM . |
@simbuatgit are you also using persistence to db/jpa? I've been looking this and there might be an issue with persistent context as most of a persist/restore tests are using in-memory structure(to make tests faster and be outside of an external structure). |
Think I finally found a probable reason for this issue. That runtime persister component with regions creates different entries(one for every region aka root, and childs in substate) in a DB while restore then how it's done expects contexts to be in one one entry. I'm going to see this a bit further. |
@jvalkeal do you have a workaround for this?, thanks! |
@jvalkeal You can see my solution at ShvetsovDV@4837d83 And second part of fix it is edit resetStateMachine in AbstractStateMachine like this ShvetsovDV@e813399 |
Wondering what the state of this is? Im encountering this now and it would be nice to get a fix in. |
We have been using this fix in our own repository for several months now.
пн, 4 апр. 2022 г., 18:54 Brian Towles ***@***.***>:
… Wondering what the state of this is? Im encountering this now and it would
be nice to get a fix in.
—
Reply to this email directly, view it on GitHub
<#811 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOOBXPQMOJOVJZTTUZXWXO3VDMGC5ANCNFSM4I3S447Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@jvalkeal did you have a chance to look into this? I don't mind helping with the issue, but I would happy to some guidelines, especially if you made some progress on it. P.S. I went over related issues and looked to the proposed fix by @ShvetsovDV |
Problem statement
Issues
JpaRepositoryStateMachinePersist
), all sub-regions seem to be reset upon restarting the SM. It continues from the fork parent task and re-runs all children.Expectations
Observations
It appears that the current state of each sub-region is persisted using the parent context (except in the case of initial state). This in turn overwrites the last sub-statemachine state, instead of being additive.
This works on explicit persistence of entire SM, so it may be that there might be an issue with context building.
Please see repo with example here
Please let me know if any additional details or setup support is required.
The text was updated successfully, but these errors were encountered: