VariableContainer parseFrom = JBPMMessages.VariableContainer.parseFrom(_header.getPayload(), registry); Map<String, Object> value = ProtobufProcessMarshaller.unmarshallVariableContainerValue(context, parseFrom);
throw ioe; _instance = JBPMMessages.ProcessInstance.parseFrom( _header.getPayload(), registry );
@Override public org.drools.core.process.instance.WorkItem readWorkItem(MarshallerReaderContext context) { try { ExtensionRegistry registry = PersisterHelper.buildRegistry(context, null); Header _header = PersisterHelper.readFromStreamWithHeaderPreloaded(context, registry); JBPMMessages.WorkItem _workItem = JBPMMessages.WorkItem.parseFrom(_header.getPayload(), registry); return (org.drools.core.process.instance.WorkItem) readWorkItem(context, _workItem, persistWorkItemVars); } catch (IOException e) { throw new IllegalArgumentException( "IOException while fetching work item instance : " + e.getMessage(), e ); } catch (ClassNotFoundException e) { throw new IllegalArgumentException( "ClassNotFoundException while fetching work item instance : " + e.getMessage(), e ); } }
throw ioe; _instance = JBPMMessages.ProcessInstance.parseFrom( _header.getPayload(), registry );
@SuppressWarnings({ "unchecked", "rawtypes" }) private static Object fallbackParse(MarshallerReaderContext context, Header header, ExtensionRegistry registry) throws Exception { Variable parseFrom = JBPMMessages.Variable.parseFrom(header.getPayload(), registry); Object value = ProtobufProcessMarshaller.unmarshallVariableValue(context, parseFrom); if (value instanceof Map) { Map result = new HashMap(); Map<String, Variable> variablesMap = (Map<String, Variable>) value; for (String key : variablesMap.keySet()) { result.put(key, ProtobufProcessMarshaller.unmarshallVariableValue(context, variablesMap.get(key))); } return result; } return value; } }
@Override public org.drools.core.process.instance.WorkItem readWorkItem(MarshallerReaderContext context) { try { ExtensionRegistry registry = PersisterHelper.buildRegistry(context, null); Header _header = PersisterHelper.readFromStreamWithHeaderPreloaded(context, registry); JBPMMessages.WorkItem _workItem = JBPMMessages.WorkItem.parseFrom(_header.getPayload(), registry); return (org.drools.core.process.instance.WorkItem) readWorkItem(context, _workItem, persistWorkItemVars); } catch (IOException e) { throw new IllegalArgumentException( "IOException while fetching work item instance : " + e.getMessage(), e ); } catch (ClassNotFoundException e) { throw new IllegalArgumentException( "ClassNotFoundException while fetching work item instance : " + e.getMessage(), e ); } }