[jboss-user] [jBPM] - Re: How to get WorkItemHandler results

Esteban Aliverti do-not-reply at jboss.com
Fri Feb 24 11:52:46 EST 2012


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/719570#719570

--------------------------------------------------------------
Let's say you have a "Calculate Random Number" Work Item. The WI Handler will calculate a random value, put it into a Map using some key:

Map<String, Object> result = new HashMap<String,Object>();
result.put(*"rndNumber"*, randomNumber);

manager.completeWorkItem(workItem.getId(), result);

In the process designer you will need to map the *"rndNumber"* result to some variable in your process. If you are using the web designer you have to add in the "associations" attribute of the Task:

rndNumber->processVariableThatWillHoldTheNumber 

This is similar to what you have to do if you want to pass parameters to the Work Item.

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

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120224/e9abdd36/attachment.html 


More information about the jboss-user mailing list