hansi007
2012-05-30 15:03:23 UTC
hansi007 [https://community.jboss.org/people/hansi007] created the discussion
"Pass the result of a workitem to the next workitem with a workitemhandler"
To view the discussion, visit: https://community.jboss.org/message/738803#738803
--------------------------------------------------------------
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
[https://community.jboss.org/message/738803#738803]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
"Pass the result of a workitem to the next workitem with a workitemhandler"
To view the discussion, visit: https://community.jboss.org/message/738803#738803
--------------------------------------------------------------
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
[https://community.jboss.org/message/738803#738803]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]