2 Replies Latest reply on Feb 21, 2013 1:13 AM by ashu.itbhu

    How to get results form Work Item handler

    ashu.itbhu Newbie

      I want to impl db handler and my dbhandler.wid file is like this...


      import org.drools.process.core.datatype.impl.type.StringDataType;

      import org.drools.process.core.datatype.impl.type.ObjectDataType;


      // the Notification work item


      "name" : "Database",

      "parameters" : [

      "GET_OR_UPDATE" : new StringDataType(),

      "SQL" : new StringDataType(),

      "ReturnMode" : new StringDataType(),


      "results" : [

      "DB_OPS" : new ObjectDataType(),


      "displayName" : "Database",

      "icon" : "icons/dbops.png"





      In my WorkItemHandler impl class i have code like this


      public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {

      Map<String, Object> outputMap = new HashMap<String, Object>();
      outputMap.put("results", emps);
      manager.completeWorkItem(workItem.getId(), outputMap);


      and in porcess i have

      WI impl like

      Result Mapping----->DB_OPS ---> map(java.util.HashMap)


      but his is returning nothing from handler calss.... please let me know what wrong i am doing here.