Search in sources :

Example 6 with ProcessInstanceManager

use of org.jbpm.process.instance.ProcessInstanceManager 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)6 MarshallerReaderContext (org.drools.core.marshalling.impl.MarshallerReaderContext)3 MarshallerWriteContext (org.drools.core.marshalling.impl.MarshallerWriteContext)3 RuleFlowProcessInstance (org.jbpm.ruleflow.instance.RuleFlowProcessInstance)3 ProcessInstance (org.kie.api.runtime.process.ProcessInstance)3 InternalWorkingMemory (org.drools.core.common.InternalWorkingMemory)2 ProcessRuntimeImpl (org.jbpm.process.instance.ProcessRuntimeImpl)2 KieSession (org.kie.api.runtime.KieSession)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 ObjectInputStream (java.io.ObjectInputStream)1 InternalKnowledgeRuntime (org.drools.core.common.InternalKnowledgeRuntime)1 InternalKnowledgeBase (org.drools.core.impl.InternalKnowledgeBase)1 KnowledgeBaseImpl (org.drools.core.impl.KnowledgeBaseImpl)1 ClassPathResource (org.drools.core.io.impl.ClassPathResource)1 MarshallingConfigurationImpl (org.drools.core.marshalling.impl.MarshallingConfigurationImpl)1 ProcessInstanceResolverStrategy (org.jbpm.marshalling.impl.ProcessInstanceResolverStrategy)1 DefaultProcessInstanceManager (org.jbpm.process.instance.impl.DefaultProcessInstanceManager)1 AbstractBaseTest (org.jbpm.test.util.AbstractBaseTest)1 Test (org.junit.Test)1