Change persistence model structure

- Fix wrong acquire logic in DefaultStatemachineService.
- Overhaul StateMachineRuntimePersister
- Change StateMachineRuntimePersister to extend
  StateMachinePersist which should work better on
  a bean level. Also add generic type T to it and
  config where needed.
- Relates to #432
- Relates to #427
This commit is contained in:
Janne Valkealahti
2017-11-23 08:04:15 +00:00
parent 3d538f7600
commit 51412b5d03
9 changed files with 40 additions and 31 deletions

View File

@@ -363,7 +363,7 @@ public class JpaRepositoryTests extends AbstractRepositoryTests {
}
@Bean
public StateMachineRuntimePersister<String, String> stateMachineRuntimePersister() {
public StateMachineRuntimePersister<String, String, String> stateMachineRuntimePersister() {
return new JpaPersistingStateMachineInterceptor<>(jpaStateMachineRepository);
}
}
@@ -408,7 +408,7 @@ public class JpaRepositoryTests extends AbstractRepositoryTests {
}
@Bean
public StateMachineRuntimePersister<PersistTestStates, PersistTestEvents> stateMachineRuntimePersister() {
public StateMachineRuntimePersister<PersistTestStates, PersistTestEvents, String> stateMachineRuntimePersister() {
return new JpaPersistingStateMachineInterceptor<>(jpaStateMachineRepository);
}
}