Use the contextObj as is when saving the StateMachineContext

- Polish and fix some merge issues
- Relates #494
This commit is contained in:
james
2018-02-07 16:37:29 +01:00
committed by jvalkeal
parent ef8704cf44
commit 041189bb31
7 changed files with 34 additions and 11 deletions

View File

@@ -59,7 +59,7 @@ public abstract class RepositoryStateMachinePersist<M extends RepositoryStateMac
if (log.isDebugEnabled()) {
log.debug("Persisting context " + context + " using contextObj " + contextObj);
}
M build = build(context, serialisationService.serialiseStateMachineContext(context));
M build = build(context, contextObj, serialisationService.serialiseStateMachineContext(context));
getRepository().save(build);
}
@@ -83,8 +83,9 @@ public abstract class RepositoryStateMachinePersist<M extends RepositoryStateMac
* Builds the generic {@link RepositoryStateMachine} entity.
*
* @param context the context
* @param contextObj the context obj
* @param serialisedContext the serialised context
* @return the repository state machine entity
*/
protected abstract M build(StateMachineContext<S, E> context, byte[] serialisedContext);
protected abstract M build(StateMachineContext<S, E> context, Object contextObj, byte[] serialisedContext);
}