[jboss-user] [jBPM] - Re: Change process variable from domain specific (WorkItemHandler)
Demian Calcaprina
do-not-reply at jboss.com
Wed Dec 7 18:12:45 EST 2011
Demian Calcaprina [http://community.jboss.org/people/calca] created the discussion
"Re: Change process variable from domain specific (WorkItemHandler)"
To view the discussion, visit: http://community.jboss.org/message/640462#640462
--------------------------------------------------------------
Hi Sam,
You have to:
-Define VAR_X as input of the node. Something like this:
http://dcalca.files.wordpress.com/2011/05/input1.png http://dcalca.files.wordpress.com/2011/05/input1.png
You give it a name to use inside the workItem.
-You can get the variable from work item parameters.
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
workItem.getParameter("VAR_X")
...
}
- Define VAR_X as output of the node.
It is similar to the input
- Put this variable in the result map
Map<String, Object> results = new HashMap<String, Object>();
results.put("VAR_X", var)
You can see that you are not directly accessing to the global variables.. you have inputs and outputs of each task..
Demian
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/640462#640462]
Start a new discussion in jBPM at Community
[http://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/20111207/29d1f1fb/attachment.html
More information about the jboss-user
mailing list