Package org.drools.process.instance

Examples of org.drools.process.instance.WorkItemHandler


      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"));
          manager.completeWorkItem(workItem.getId(), null);
        }
        public void abortWorkItem(WorkItem arg0, WorkItemManager arg1) {
View Full Code Here


      RuleBase ruleBase = createKnowledgeBase();
      StatefulSession session = ruleBase.newStatefulSession();
      session.getWorkItemManager().registerWorkItemHandler("Finder", new FinderWorkItemHandler());
      session.getWorkItemManager().registerWorkItemHandler("Archive", new ArchiveWorkItemHandler());
      session.getWorkItemManager().registerWorkItemHandler("Exec", new ExecWorkItemHandler());
      session.getWorkItemManager().registerWorkItemHandler("Log", new WorkItemHandler() {
        public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
          System.out.println("Log: " + workItem.getParameter("Message"));
          manager.completeWorkItem(workItem.getId(), null);
        }
        public void abortWorkItem(WorkItem arg0, WorkItemManager arg1) {
View Full Code Here

      RuleBase ruleBase = createKnowledgeBase();
      StatefulSession session = ruleBase.newStatefulSession();
      session.getWorkItemManager().registerWorkItemHandler("Finder", new FinderWorkItemHandler());
      session.getWorkItemManager().registerWorkItemHandler("Archive", new ArchiveWorkItemHandler());
      session.getWorkItemManager().registerWorkItemHandler("Exec", new ExecWorkItemHandler());
      session.getWorkItemManager().registerWorkItemHandler("Log", new WorkItemHandler() {
        public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
          System.out.println("Log: " + workItem.getParameter("Message"));
          manager.completeWorkItem(workItem.getId(), null);
        }
        public void abortWorkItem(WorkItem arg0, WorkItemManager arg1) {
View Full Code Here

      RuleBase ruleBase = createKnowledgeBase();
      StatefulSession session = ruleBase.newStatefulSession();
      session.getWorkItemManager().registerWorkItemHandler("Finder", new FinderWorkItemHandler());
      session.getWorkItemManager().registerWorkItemHandler("Archive", new ArchiveWorkItemHandler());
      session.getWorkItemManager().registerWorkItemHandler("Exec", new ExecWorkItemHandler());
      session.getWorkItemManager().registerWorkItemHandler("Log", new WorkItemHandler() {
        public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
          System.out.println("Log: " + workItem.getParameter("Message"));
          manager.completeWorkItem(workItem.getId(), null);
        }
        public void abortWorkItem(WorkItem arg0, WorkItemManager arg1) {
View Full Code Here

TOP

Related Classes of org.drools.process.instance.WorkItemHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.