public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
String className = (String) workItem.getParameter("Class");
try {
Class<JavaHandler> c = (Class<JavaHandler>) Class.forName(className);
JavaHandler handler = c.newInstance();
ProcessContext kcontext = new ProcessContext(ksession);
WorkflowProcessInstance processInstance = (WorkflowProcessInstance)
ksession.getProcessInstance(workItem.getProcessInstanceId());
kcontext.setProcessInstance(processInstance);
WorkItemNodeInstance nodeInstance = findNodeInstance(workItem.getId(), processInstance);
kcontext.setNodeInstance(nodeInstance);
Map<String, Object> results = handler.execute(kcontext);
manager.completeWorkItem(workItem.getId(), results);
return;
} catch (ClassNotFoundException e) {
System.err.println(e);