Esteban Aliverti [https://community.jboss.org/people/eaa] created the discussion

"Re: How to get WorkItemHandler results"

To view the discussion, visit: https://community.jboss.org/message/719574#719574

--------------------------------------------------------------
The results of a WorkItem Handler are usually used INSIDE the process. If you 
need them outside of the process you can basically follow 2 mechanisms:
1. Create your external mechanism that the WorkItem Handler will use: i.e. pass 
a List to the constructor of the WorkItem Handler, the handler then will 
populate the list (no need to put the results in the resulting map since you 
are not going to use the value in the process) and then retrieve the value from 
your app.
2. Put the result in the map and pass it to the process (this is automatically 
done when you complete the WI), in the process definition you have to map the 
result to a process' variable. Then, when the process is completed, you can get 
the value of that variable using something like:
((WorkFlowProcessInstance) process).getVariable("nameOfTheProcessVariable")

Best Regards,
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/719574#719574]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to