public static final void main(String[] args) {
try {
KnowledgeBase kbase = createKnowledgeBase();
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
ksession.getWorkItemManager().registerWorkItemHandler("Finder", new FinderWorkItemHandler());
ksession.getWorkItemManager().registerWorkItemHandler("Archive", new ArchiveWorkItemHandler());
ksession.getWorkItemManager().registerWorkItemHandler("Exec", new ExecWorkItemHandler());
ksession.getWorkItemManager().registerWorkItemHandler("Log", new WorkItemHandler() {
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
System.out.println("Log: " + workItem.getParameter("Message"));