JBoss Community

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

created by hansi007 in jBPM - View the full discussion

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) {
 
          } 
}
 

Reply to this message by going to Community

Start a new discussion in jBPM at Community