Skip to content
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

DefaultStateMachineService does not restore state properly #959

Open
azhuchkov opened this issue May 13, 2021 · 1 comment
Open

DefaultStateMachineService does not restore state properly #959

azhuchkov opened this issue May 13, 2021 · 1 comment
Labels
status/need-triage Team needs to triage and take a first look

Comments

@azhuchkov
Copy link

DefaultStateMachineService has method restoreStateMachine that restores persisted state into newly created state machine, but it does not work for the case with hierarchical states.

According to DefaultStateMachinePersister and some examples over Internet, FSM should be restored using stateMachine.getStateMachineAccessor().doWithAllRegions(), but DefaultStateMachineService for some reason restores only top level region:

// only go via top region
stateMachine.getStateMachineAccessor().doWithRegion(function -> function.resetStateMachine(stateMachineContext));
@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label May 13, 2021
@chutch
Copy link

chutch commented Sep 15, 2021

Issues that you are experiencing are attempted to be addressed here: #998

Restoring with top level region is correct, because the function itself is recursive. Actual persisting is broken there, that's why it doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/need-triage Team needs to triage and take a first look
Projects
None yet
Development

No branches or pull requests

2 participants