public class ProcessInstanceResolverStrategy extends Object implements org.kie.api.marshalling.ObjectMarshallingStrategy
ProcessInstance objects,
saves the process instance in the ProcessInstanceManager, and later retrieves
it from there.
Should a process instance be completed or aborted, it will be restored as an empty
RuleFlowProcessInstance with correct id and state completed, yet no internal details.
If you're doing tricky things with serialization and persistence, please make sure
to remember that the ProcessInstanceManager cache of process instances is emptied
at the end of every transaction (commit).| Constructor and Description |
|---|
ProcessInstanceResolverStrategy() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Object object) |
org.kie.api.marshalling.ObjectMarshallingStrategy.Context |
createContext() |
byte[] |
marshal(org.kie.api.marshalling.ObjectMarshallingStrategy.Context context,
ObjectOutputStream os,
Object object) |
Object |
read(ObjectInputStream is) |
static org.drools.core.common.InternalKnowledgeRuntime |
retrieveKnowledgeRuntime(Object streamContext)
Retrieve the
ProcessInstanceManager object from the ObjectOutput- or ObjectInputStream. |
static ProcessInstanceManager |
retrieveProcessInstanceManager(Object streamContext)
Retrieve the
ProcessInstanceManager object from the ObjectOutput- or ObjectInputStream. |
Object |
unmarshal(org.kie.api.marshalling.ObjectMarshallingStrategy.Context context,
ObjectInputStream is,
byte[] object,
ClassLoader classloader) |
void |
write(ObjectOutputStream os,
Object object) |
public boolean accept(Object object)
accept in interface org.kie.api.marshalling.ObjectMarshallingStrategypublic void write(ObjectOutputStream os, Object object) throws IOException
write in interface org.kie.api.marshalling.ObjectMarshallingStrategyIOExceptionpublic Object read(ObjectInputStream is) throws IOException, ClassNotFoundException
read in interface org.kie.api.marshalling.ObjectMarshallingStrategyIOExceptionClassNotFoundExceptionpublic static ProcessInstanceManager retrieveProcessInstanceManager(Object streamContext)
ProcessInstanceManager object from the ObjectOutput- or ObjectInputStream.
The stream object will secretly also either be a MarshallerReaderContext or a
MarshallerWriteContext.streamContext - The marshaller stream/context.ProcessInstanceManager object.public static org.drools.core.common.InternalKnowledgeRuntime retrieveKnowledgeRuntime(Object streamContext)
ProcessInstanceManager object from the ObjectOutput- or ObjectInputStream.
The stream object will secretly also either be a MarshallerReaderContext or a
MarshallerWriteContext.
The knowledge runtime object is useful in order to reconnect the process instance to the
process and the knowledge runtime object.streamContext - The marshaller stream/context.InternalKnowledgeRuntime object.public byte[] marshal(org.kie.api.marshalling.ObjectMarshallingStrategy.Context context,
ObjectOutputStream os,
Object object)
throws IOException
marshal in interface org.kie.api.marshalling.ObjectMarshallingStrategyIOExceptionpublic Object unmarshal(org.kie.api.marshalling.ObjectMarshallingStrategy.Context context, ObjectInputStream is, byte[] object, ClassLoader classloader) throws IOException, ClassNotFoundException
unmarshal in interface org.kie.api.marshalling.ObjectMarshallingStrategyIOExceptionClassNotFoundExceptionpublic org.kie.api.marshalling.ObjectMarshallingStrategy.Context createContext()
createContext in interface org.kie.api.marshalling.ObjectMarshallingStrategyCopyright © 2001–2018 JBoss by Red Hat. All rights reserved.