System.err.println("Error loading session data: " + e.getMessage());
throw e;
}
}
new WorkingMemoryDbLogger(ksession);
CommandBasedWSHumanTaskHandler handler = new CommandBasedWSHumanTaskHandler(ksession);
properties = new Properties();
try {
properties.load(CommandDelegate.class.getResourceAsStream("/jbpm.console.properties"));
} catch (IOException e) {
throw new RuntimeException("Could not load jbpm.console.properties", e);
}
handler.setConnection(
properties.getProperty("jbpm.console.task.service.host"),
new Integer(properties.getProperty("jbpm.console.task.service.port")));
ksession.getWorkItemManager().registerWorkItemHandler(
"Human Task", handler);
handler.connect();
System.out.println("Successfully loaded default package from Guvnor");
return ksession;
} catch (Throwable t) {
throw new RuntimeException(
"Could not initialize stateful knowledge session: "