Refine search
@Override public void writeWorkItem(MarshallerWriteContext context, org.drools.core.process.instance.WorkItem workItem) { try { JBPMMessages.WorkItem _workItem = writeWorkItem(context, workItem, persistWorkItemVars); PersisterHelper.writeToStreamWithHeader( context, _workItem ); } catch (IOException e) { throw new IllegalArgumentException( "IOException while storing work item instance " + workItem.getId() + ": " + e.getMessage(), e ); } }
@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 ); } }
public byte[] marshal(Context context, ObjectOutputStream os, Object object) throws IOException { ProcessInstance processInstance = (ProcessInstance) object; connectProcessInstanceToRuntimeAndProcess( processInstance, os ); return PersisterHelper.longToByteArray( processInstance.getId() ); }
public Object unmarshal(Context context, ObjectInputStream is, byte[] object, ClassLoader classloader) throws IOException, ClassNotFoundException { long processInstanceId = PersisterHelper.byteArrayToLong( object ); ProcessInstanceManager pim = retrieveProcessInstanceManager( is ); // load it as read only to avoid any updates to the data base ProcessInstance processInstance = pim.getProcessInstance( processInstanceId, true ); if (processInstance == null) { RuleFlowProcessInstance result = new RuleFlowProcessInstance(); result.setId( processInstanceId ); result.internalSetState(ProcessInstance.STATE_COMPLETED); return result; } else { connectProcessInstanceToRuntimeAndProcess( processInstance, is ); return processInstance; } }
public Object unmarshal(Context context, ObjectInputStream is, byte[] object, ClassLoader classloader) throws IOException, ClassNotFoundException { long processInstanceId = PersisterHelper.byteArrayToLong( object ); ProcessInstanceManager pim = retrieveProcessInstanceManager( is ); // load it as read only to avoid any updates to the data base ProcessInstance processInstance = pim.getProcessInstance( processInstanceId, true ); if (processInstance == null) { RuleFlowProcessInstance result = new RuleFlowProcessInstance(); result.setId( processInstanceId ); result.internalSetState(ProcessInstance.STATE_COMPLETED); return result; } else { connectProcessInstanceToRuntimeAndProcess( processInstance, is ); return processInstance; } }
context.classLoader = ContentMarshallerHelper.class.getClassLoader(); ExtensionRegistry registry = PersisterHelper.buildRegistry(context, null); Header _header = PersisterHelper.readFromStreamWithHeaderPreloaded(context, registry);
if( marshaller instanceof ProtobufRuleFlowProcessInstanceMarshaller && result != null ) { JBPMMessages.ProcessInstance _instance = (JBPMMessages.ProcessInstance)result; PersisterHelper.writeToStreamWithHeader( context, _instance );
public byte[] marshal(Context context, ObjectOutputStream os, Object object) throws IOException { ProcessInstance processInstance = (ProcessInstance) object; connectProcessInstanceToRuntimeAndProcess( processInstance, os ); return PersisterHelper.longToByteArray( processInstance.getId() ); }
if( _instance == null ) { ExtensionRegistry registry = PersisterHelper.buildRegistry( context, null ); Header _header; try { _header = PersisterHelper.readFromStreamWithHeaderPreloaded(context, registry); } catch ( ClassNotFoundException e ) {
PersisterHelper.writeToStreamWithHeader(context, marshallVariable);
@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 ); } }
@Override public void writeWorkItem(MarshallerWriteContext context, org.drools.core.process.instance.WorkItem workItem) { try { JBPMMessages.WorkItem _workItem = writeWorkItem(context, workItem, persistWorkItemVars); PersisterHelper.writeToStreamWithHeader( context, _workItem ); } catch (IOException e) { throw new IllegalArgumentException( "IOException while storing work item instance " + workItem.getId() + ": " + e.getMessage(), e ); } }
if( _instance == null ) { ExtensionRegistry registry = PersisterHelper.buildRegistry( context, null ); Header _header; try { _header = PersisterHelper.readFromStreamWithHeaderPreloaded(context, registry); } catch ( ClassNotFoundException e ) {