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]

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

Reply via email to