Restore all regions of statemachine

- Restore all regions of statemachine
- A persisted statemachine with orthogonal states will not be correctly
  restored as only the top region gets correctly reset. Tests in
  StateMachineResetTests use the correct way to reset the statemachine
  with all regions
- Backport #978
- Fixes #981
This commit is contained in:
Erik Greijus
2021-06-27 10:08:30 +01:00
committed by Janne Valkealahti
parent 6c015d5a0d
commit 5683b26782

View File

@@ -168,7 +168,7 @@ public class DefaultStateMachineService<S, E> implements StateMachineService<S,
}
stateMachine.stop();
// only go via top region
stateMachine.getStateMachineAccessor().doWithRegion(new StateMachineFunction<StateMachineAccess<S, E>>() {
stateMachine.getStateMachineAccessor().doWithAllRegions(new StateMachineFunction<StateMachineAccess<S, E>>() {
@Override
public void apply(StateMachineAccess<S, E> function) {