org.jbpm.runtime.manager.impl
Class PerProcessInstanceRuntimeManager
java.lang.Object
org.jbpm.runtime.manager.impl.AbstractRuntimeManager
org.jbpm.runtime.manager.impl.PerProcessInstanceRuntimeManager
- All Implemented Interfaces:
- org.kie.api.runtime.manager.RuntimeManager, org.kie.internal.runtime.manager.InternalRuntimeManager
public class PerProcessInstanceRuntimeManager
- extends AbstractRuntimeManager
A RuntimeManager implementation that is backed by the "Per Process Instance" strategy. This means that every
process instance will be bound to a ksession for it's entire life time. Once started, whenever other operations are invoked,
this manager will ensure that the correct ksession will be provided.
This also applies to sub processes (reusable sub processes) that create new process instances: the sub process instance
will have its own ksession independent of the parent one.
This manager will ensure that as soon as the process instance completes, the ksession will be disposed of and destroyed.
This implementation supports the following Context implementations:
- ProcessInstanceIdContext
- CorrelationKeyContext
- EmptyContext - for initial RuntimeEngine to start process only
|
Constructor Summary |
PerProcessInstanceRuntimeManager(org.kie.api.runtime.manager.RuntimeEnvironment environment,
org.kie.internal.runtime.manager.SessionFactory factory,
org.kie.internal.runtime.manager.TaskServiceFactory taskServiceFactory,
String identifier)
|
|
Method Summary |
void |
close()
|
void |
disposeRuntimeEngine(org.kie.api.runtime.manager.RuntimeEngine runtime)
|
protected org.kie.api.runtime.manager.RuntimeEngine |
findLocalRuntime(Object processInstanceId)
|
org.kie.internal.runtime.manager.SessionFactory |
getFactory()
|
org.kie.internal.runtime.manager.Mapper |
getMapper()
|
org.kie.api.runtime.manager.RuntimeEngine |
getRuntimeEngine(org.kie.api.runtime.manager.Context<?> context)
|
org.kie.internal.runtime.manager.TaskServiceFactory |
getTaskServiceFactory()
|
void |
init()
|
protected void |
removeLocalRuntime(org.kie.api.runtime.manager.RuntimeEngine runtime)
|
protected void |
saveLocalRuntime(Object processInstanceId,
org.kie.api.runtime.manager.RuntimeEngine runtime)
|
void |
setFactory(org.kie.internal.runtime.manager.SessionFactory factory)
|
void |
setMapper(org.kie.internal.runtime.manager.Mapper mapper)
|
void |
setTaskServiceFactory(org.kie.internal.runtime.manager.TaskServiceFactory taskServiceFactory)
|
boolean |
validate(Integer ksessionId,
Long processInstanceId)
|
void |
validate(org.kie.api.runtime.KieSession ksession,
org.kie.api.runtime.manager.Context<?> context)
|
| Methods inherited from class org.jbpm.runtime.manager.impl.AbstractRuntimeManager |
attachManager, canDestroy, checkPermission, close, configureRuntimeOnTaskService, getCacheManager, getDeploymentDescriptor, getEnvironment, getIdentifier, getTransactionManager, hasEnvironmentEntry, isClosed, registerDisposeCallback, registerItems, removeRuntimeFromTaskService, setCacheManager, setDeploymentDescriptor, setEnvironment, setIdentifier, setSecurityManager |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PerProcessInstanceRuntimeManager
public PerProcessInstanceRuntimeManager(org.kie.api.runtime.manager.RuntimeEnvironment environment,
org.kie.internal.runtime.manager.SessionFactory factory,
org.kie.internal.runtime.manager.TaskServiceFactory taskServiceFactory,
String identifier)
getRuntimeEngine
public org.kie.api.runtime.manager.RuntimeEngine getRuntimeEngine(org.kie.api.runtime.manager.Context<?> context)
validate
public void validate(org.kie.api.runtime.KieSession ksession,
org.kie.api.runtime.manager.Context<?> context)
throws IllegalStateException
- Throws:
IllegalStateException
disposeRuntimeEngine
public void disposeRuntimeEngine(org.kie.api.runtime.manager.RuntimeEngine runtime)
close
public void close()
- Specified by:
close in interface org.kie.api.runtime.manager.RuntimeManager- Overrides:
close in class AbstractRuntimeManager
validate
public boolean validate(Integer ksessionId,
Long processInstanceId)
getFactory
public org.kie.internal.runtime.manager.SessionFactory getFactory()
setFactory
public void setFactory(org.kie.internal.runtime.manager.SessionFactory factory)
getTaskServiceFactory
public org.kie.internal.runtime.manager.TaskServiceFactory getTaskServiceFactory()
setTaskServiceFactory
public void setTaskServiceFactory(org.kie.internal.runtime.manager.TaskServiceFactory taskServiceFactory)
getMapper
public org.kie.internal.runtime.manager.Mapper getMapper()
setMapper
public void setMapper(org.kie.internal.runtime.manager.Mapper mapper)
findLocalRuntime
protected org.kie.api.runtime.manager.RuntimeEngine findLocalRuntime(Object processInstanceId)
saveLocalRuntime
protected void saveLocalRuntime(Object processInstanceId,
org.kie.api.runtime.manager.RuntimeEngine runtime)
removeLocalRuntime
protected void removeLocalRuntime(org.kie.api.runtime.manager.RuntimeEngine runtime)
init
public void init()
- Specified by:
init in class AbstractRuntimeManager
Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.