// register human task work item.
SyncWSHumanTaskHandler humanTaskHandler = new SyncWSHumanTaskHandler(
taskService, ksession);
humanTaskHandler.setLocal(true);
humanTaskHandler.connect();
ksession.getWorkItemManager().registerWorkItemHandler("Human Task", humanTaskHandler);
// register other work items
ksession.getWorkItemManager().registerWorkItemHandler("Log", new SystemOutWorkItemHandler());
ksession.getWorkItemManager().registerWorkItemHandler("Email", new SystemOutWorkItemHandler());