Search in sources :

Example 1 with DefaultProcessInstanceManager

use of org.jbpm.process.instance.impl.DefaultProcessInstanceManager in project jbpm by kiegroup.

the class InMemorySessionFactory method newKieSession.

@Override
public KieSession newKieSession() {
    Environment env = environment.getEnvironment();
    env.set(EnvironmentName.DEPLOYMENT_ID, owner);
    KieSession ksession = kbase.newKieSession(environment.getConfiguration(), env);
    this.sessions.put(ksession.getIdentifier(), ksession);
    ProcessInstanceManager piManager = ((ProcessRuntimeImpl) ((StatefulKnowledgeSessionImpl) ksession).getProcessRuntime()).getProcessInstanceManager();
    if (piManager instanceof DefaultProcessInstanceManager) {
        ((DefaultProcessInstanceManager) piManager).setProcessCounter(processCounter);
    }
    return ksession;
}
Also used : DefaultProcessInstanceManager(org.jbpm.process.instance.impl.DefaultProcessInstanceManager) ProcessInstanceManager(org.jbpm.process.instance.ProcessInstanceManager) ProcessRuntimeImpl(org.jbpm.process.instance.ProcessRuntimeImpl) RuntimeEnvironment(org.kie.api.runtime.manager.RuntimeEnvironment) Environment(org.kie.api.runtime.Environment) KieSession(org.kie.api.runtime.KieSession) DefaultProcessInstanceManager(org.jbpm.process.instance.impl.DefaultProcessInstanceManager)

Aggregations

ProcessInstanceManager (org.jbpm.process.instance.ProcessInstanceManager)1 ProcessRuntimeImpl (org.jbpm.process.instance.ProcessRuntimeImpl)1 DefaultProcessInstanceManager (org.jbpm.process.instance.impl.DefaultProcessInstanceManager)1 Environment (org.kie.api.runtime.Environment)1 KieSession (org.kie.api.runtime.KieSession)1 RuntimeEnvironment (org.kie.api.runtime.manager.RuntimeEnvironment)1