jBPM :: JPA Persistence 6.1.0.CR2

org.jbpm.persistence.processinstance
Class JPAProcessInstanceManager

java.lang.Object
  extended by org.jbpm.persistence.processinstance.JPAProcessInstanceManager
All Implemented Interfaces:
org.jbpm.process.instance.ProcessInstanceManager

public class JPAProcessInstanceManager
extends Object
implements org.jbpm.process.instance.ProcessInstanceManager

This is an implementation of the ProcessInstanceManager that uses JPA.

What's important to remember here is that we have a jbpm-console which has 1 static (stateful) knowledge session which is used by multiple threads: each request sent to the jbpm-console is picked up in it's own thread.

This means that multiple threads can be using the same instance of this class.


Constructor Summary
JPAProcessInstanceManager()
           
 
Method Summary
 void addProcessInstance(org.kie.api.runtime.process.ProcessInstance processInstance, org.kie.internal.process.CorrelationKey correlationKey)
           
 void clearProcessInstances()
           
 void clearProcessInstancesState()
           
 org.kie.api.runtime.process.ProcessInstance getProcessInstance(org.kie.internal.process.CorrelationKey correlationKey)
           
 org.kie.api.runtime.process.ProcessInstance getProcessInstance(long id)
           
 org.kie.api.runtime.process.ProcessInstance getProcessInstance(long id, boolean readOnly)
           
 Collection<org.kie.api.runtime.process.ProcessInstance> getProcessInstances()
           
 void internalAddProcessInstance(org.kie.api.runtime.process.ProcessInstance processInstance)
           
 void internalRemoveProcessInstance(org.kie.api.runtime.process.ProcessInstance processInstance)
           
 void removeProcessInstance(org.kie.api.runtime.process.ProcessInstance processInstance)
           
 void setKnowledgeRuntime(org.drools.core.common.InternalKnowledgeRuntime kruntime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPAProcessInstanceManager

public JPAProcessInstanceManager()
Method Detail

setKnowledgeRuntime

public void setKnowledgeRuntime(org.drools.core.common.InternalKnowledgeRuntime kruntime)

addProcessInstance

public void addProcessInstance(org.kie.api.runtime.process.ProcessInstance processInstance,
                               org.kie.internal.process.CorrelationKey correlationKey)
Specified by:
addProcessInstance in interface org.jbpm.process.instance.ProcessInstanceManager

internalAddProcessInstance

public void internalAddProcessInstance(org.kie.api.runtime.process.ProcessInstance processInstance)
Specified by:
internalAddProcessInstance in interface org.jbpm.process.instance.ProcessInstanceManager

getProcessInstance

public org.kie.api.runtime.process.ProcessInstance getProcessInstance(long id)
Specified by:
getProcessInstance in interface org.jbpm.process.instance.ProcessInstanceManager

getProcessInstance

public org.kie.api.runtime.process.ProcessInstance getProcessInstance(long id,
                                                                      boolean readOnly)
Specified by:
getProcessInstance in interface org.jbpm.process.instance.ProcessInstanceManager

getProcessInstances

public Collection<org.kie.api.runtime.process.ProcessInstance> getProcessInstances()
Specified by:
getProcessInstances in interface org.jbpm.process.instance.ProcessInstanceManager

removeProcessInstance

public void removeProcessInstance(org.kie.api.runtime.process.ProcessInstance processInstance)
Specified by:
removeProcessInstance in interface org.jbpm.process.instance.ProcessInstanceManager

internalRemoveProcessInstance

public void internalRemoveProcessInstance(org.kie.api.runtime.process.ProcessInstance processInstance)
Specified by:
internalRemoveProcessInstance in interface org.jbpm.process.instance.ProcessInstanceManager

clearProcessInstances

public void clearProcessInstances()
Specified by:
clearProcessInstances in interface org.jbpm.process.instance.ProcessInstanceManager

clearProcessInstancesState

public void clearProcessInstancesState()
Specified by:
clearProcessInstancesState in interface org.jbpm.process.instance.ProcessInstanceManager

getProcessInstance

public org.kie.api.runtime.process.ProcessInstance getProcessInstance(org.kie.internal.process.CorrelationKey correlationKey)
Specified by:
getProcessInstance in interface org.jbpm.process.instance.ProcessInstanceManager

jBPM :: JPA Persistence 6.1.0.CR2

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.