public class WorkingMemoryDbLoggerTest extends JbpmTestCase {
public void testLogger1() {
// load the process
RuleBase ruleBase = createKnowledgeBase();
// create a new session
Properties properties = new Properties();
properties.put("drools.processInstanceManagerFactory", "org.jbpm.process.instance.impl.DefaultProcessInstanceManagerFactory");
properties.put("drools.processSignalManagerFactory", "org.jbpm.process.instance.event.DefaultSignalManagerFactory");
SessionConfiguration config = new SessionConfiguration(properties);
StatefulSession session = ruleBase.newStatefulSession(config, EnvironmentFactory.newEnvironment());
new WorkingMemoryDbLogger(session);
session.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler());
// start process instance
long processInstanceId = session.startProcess("com.sample.ruleflow").getId();