spring-projects / spring-statemachine

Spring Statemachine is a framework for application developers to use state machine concepts with Spring.
1.53k stars 599 forks source link

Hierarchical states are not being persisted in the database #1041

Open FpMarinov opened 2 years ago

FpMarinov commented 2 years ago

See: https://stackoverflow.com/questions/64048641/hierarchical-states-are-not-being-persisted-in-the-database

I have the same issue with version 3.0.1. There is a comment in the stackoverflow link that gives a possible explanation for the issue:

"The problem is in the DefaultStateMachineService class, during acquiring SM the service creates a new SM and the JpaPersistingStateMachineInterceptor persists the new SM with an initial state, then the DefaultStateMachineService reads state from DB (the state is already overridden) and calls restoreStateMachine method with the overridden state."