If you are smart and wants to migrate from Drools Flow to jBPM 5 remember to configure the processInstanceFactory and processSignalFactory, using a Properties object or configuring them into the drools.conf file, before the creation of a KnowledgeSession.
Properties properties = new Properties(); properties.put("drools.processInstanceManagerFactory", "org.jbpm.process.instance.impl.DefaultProcessInstanceManagerFactory"); properties.put("drools.processSignalManagerFactory", "org.jbpm.process.instance.event.DefaultSignalManagerFactory"); KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties); StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(config, EnvironmentFactory.newEnvironment());
otherwise you’ll obtain this RuntimeException
java.lang.RuntimeException: java.lang.ClassNotFoundException: Unable to load class: org.drools.process.instance.impl.DefaultProcessInstanceManagerFactory