//load the process
RuleBase ruleBase = createKnowledgeBase();
// create a new session
StatefulSession session = ruleBase.newStatefulSession();
new WorkingMemoryDbLogger(session);
UIWorkItemHandler uiHandler = new UIWorkItemHandler();
session.getWorkItemManager().registerWorkItemHandler("Human Task", uiHandler);
uiHandler.setVisible(true);
new ProcessInstanceExecutorFrame(session).setVisible(true);
} catch (Throwable t) {
t.printStackTrace();
}
}