properties.put("drools.processSignalManagerFactory", "org.jbpm.persistence.processinstance.JPASignalManagerFactory");
KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);
StatefulKnowledgeSession session = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, config, env);
new JPAWorkingMemoryDbLogger(session);
JPAProcessInstanceDbLog log = new JPAProcessInstanceDbLog(env);
session.getWorkItemManager().registerWorkItemHandler("Human Task", new WorkItemHandler() {
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
Map<String, Object> results = new HashMap<String, Object>();
results.put("Result", "ResultValue");
manager.completeWorkItem(workItem.getId(), results);
}