Skip to content

Commit 7d7765c

Browse files
egreijusjvalkeal
authored andcommitted
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 #980
1 parent c42dc00 commit 7d7765c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-statemachine-core/src/main/java/org/springframework/statemachine/service/DefaultStateMachineService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ protected StateMachine<S, E> restoreStateMachine(StateMachine<S, E> stateMachine
168168
}
169169
stateMachine.stop();
170170
// only go via top region
171-
stateMachine.getStateMachineAccessor().doWithRegion(new StateMachineFunction<StateMachineAccess<S, E>>() {
171+
stateMachine.getStateMachineAccessor().doWithAllRegions(new StateMachineFunction<StateMachineAccess<S, E>>() {
172172

173173
@Override
174174
public void apply(StateMachineAccess<S, E> function) {

0 commit comments

Comments
 (0)