2 Replies Latest reply on May 2, 2013 6:19 PM by David Harris

    Pass the result of a workitem to the next workitem with a workitemhandler

    hansi007 Newbie

      Is it possible to pass the results of a workitem to the next workitem with a workitemhandler:

       

       

      public  class MyHandlerWorkItemTypeA implements WorkItemHandler{
      
             @Override
                public final void executeWorkItem(WorkItem wItem, WorkItemManager wItemManager) {
                           Map<String,Object> objectToPassToTheNextWorkItem = ...
                           wItemManager.completeWorkItem(wItem.getId(), objectToPassToTheNextWorkItem ); //That doesnt work  
                }
      
                @Override
                public final void abortWorkItem(WorkItem wItem, WorkItemManager wItemManager) {
      
                }      
      }
      
      public  class MyHandlerWorkItemTypeB implements WorkItemHandler{
      
             @Override
                public final void executeWorkItem(WorkItem wItem, WorkItemManager wItemManager) {
                           Map<String,Object> objectToGetFromThePreviousWorkItem = wItem.getResults(); //That doesnt work
                }
      
                @Override
                public final void abortWorkItem(WorkItem wItem, WorkItemManager wItemManager) {
      
                } 
      }