Source:
public Module customizeProcessModelObjectMapper() { SimpleModule module = new SimpleModule("mapProcessModelInterfaces", Version.unknownVersion()); SimpleAbstractTypeResolver resolver = new SimpleAbstractTypeResolver() { @Override public JavaType resolveAbstractType(DeserializationConfig config, BeanDescription typeDesc) { return findTypeMapping(config, typeDesc.getType()); } }; resolver.addMapping(BPMNActivity.class, BPMNActivityImpl.class); resolver.addMapping(ProcessInstance.class, ProcessInstanceImpl.class); resolver.addMapping(ProcessDefinition.class, ProcessDefinitionImpl.class); resolver.addMapping(SequenceFlow.class, SequenceFlowImpl.class); resolver.addMapping(IntegrationContext.class, IntegrationContextImpl.class); resolver.addMapping(Result.class, ProcessInstanceResult.class); module.setMixInAnnotation(Result.class, ProcessInstanceResultMixIn.class); module.setMixInAnnotation(Payload.class, ProcessPayloadMixIn.class); module.registerSubtypes(new NamedType(ProcessInstanceResult.class, ProcessInstanceResult.class.getName())); module.registerSubtypes(new NamedType(DeleteProcessPayload.class, DeleteProcessPayload.class.getName())); module.registerSubtypes(new NamedType(GetProcessDefinitionsPayload.class, GetProcessDefinitionsPayload.class.getName())); module.registerSubtypes(new NamedType(GetProcessInstancesPayload.class, GetProcessInstancesPayload.class.getName())); module.registerSubtypes(new NamedType(GetVariablesPayload.class, GetVariablesPayload.class.getName())); module.registerSubtypes(new NamedType(RemoveProcessVariablesPayload.class, RemoveProcessVariablesPayload.class.getName())); module.registerSubtypes(new NamedType(SetProcessVariablesPayload.class, SetProcessVariablesPayload.class.getName())); module.registerSubtypes(new NamedType(SignalPayload.class, SignalPayload.class.getName())); module.registerSubtypes(new NamedType(StartProcessPayload.class, StartProcessPayload.class.getName())); module.registerSubtypes(new NamedType(SuspendProcessPayload.class, SuspendProcessPayload.class.getName())); module.registerSubtypes(new NamedType(ResumeProcessPayload.class, ResumeProcessPayload.class.getName())); module.setAbstractTypes(resolver); return module; }

Target:
public Module customizeProcessModelObjectMapper() { SimpleModule module = new SimpleModule("mapProcessModelInterfaces", Version.unknownVersion()); SimpleAbstractTypeResolver resolver = new SimpleAbstractTypeResolver() { @Override public JavaType resolveAbstractType(DeserializationConfig config, BeanDescription typeDesc) { return findTypeMapping(config, typeDesc.getType()); } }; resolver.addMapping(BPMNActivity.class, BPMNActivityImpl.class); resolver.addMapping(ProcessInstance.class, ProcessInstanceImpl.class); resolver.addMapping(ProcessDefinition.class, ProcessDefinitionImpl.class); resolver.addMapping(SequenceFlow.class, SequenceFlowImpl.class); resolver.addMapping(IntegrationContext.class, IntegrationContextImpl.class); module.registerSubtypes(new NamedType(ProcessInstanceResult.class, ProcessInstanceResult.class.getSimpleName())); module.registerSubtypes(new NamedType(DeleteProcessPayload.class, DeleteProcessPayload.class.getSimpleName())); module.registerSubtypes(new NamedType(GetProcessDefinitionsPayload.class, GetProcessDefinitionsPayload.class.getSimpleName())); module.registerSubtypes(new NamedType(GetProcessInstancesPayload.class, GetProcessInstancesPayload.class.getSimpleName())); module.registerSubtypes(new NamedType(GetVariablesPayload.class, GetVariablesPayload.class.getSimpleName())); module.registerSubtypes(new NamedType(RemoveProcessVariablesPayload.class, RemoveProcessVariablesPayload.class.getSimpleName())); module.registerSubtypes(new NamedType(SetProcessVariablesPayload.class, SetProcessVariablesPayload.class.getSimpleName())); module.registerSubtypes(new NamedType(SignalPayload.class, SignalPayload.class.getSimpleName())); module.registerSubtypes(new NamedType(StartProcessPayload.class, StartProcessPayload.class.getSimpleName())); module.registerSubtypes(new NamedType(SuspendProcessPayload.class, SuspendProcessPayload.class.getSimpleName())); module.registerSubtypes(new NamedType(ResumeProcessPayload.class, ResumeProcessPayload.class.getSimpleName())); module.setAbstractTypes(resolver); return module; }