[jboss-user] [jBPM] - Re: How can a Service Task take integer variable via additional parameters?

Kris Verlaenen do-not-reply at jboss.com
Mon Jun 27 12:02:00 EDT 2011


Kris Verlaenen [http://community.jboss.org/people/KrisVerlaenen] created the discussion

"Re: How can a Service Task take integer variable via additional parameters?"

To view the discussion, visit: http://community.jboss.org/message/612162#612162

--------------------------------------------------------------
Hi,

#{expression} only works for String parameters (as the result it produces is a String).  To map any other object to a Task parameter, you should use parameter mapping.  Parameter mapping allows you to copy the value of a process variable to the Task parameter.  For example, if you want to copy an Integer as a service parameter, define a parameter mapping that copies the value from a process variable to that service parameter.  You can use an on-entry/on-exit action on your service task (or a normal script task before the service task) to set the value of the Integer (in this case something like kcontext.setVariable("myIntVariable", new Integer(mxInt));

The documentation on service input / output mapping has recently been extended, so it might be useful to reread the core engine: basics chapter and the human tasks chapter.

Kris
--------------------------------------------------------------

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

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/20110627/21d1786b/attachment.html 


More information about the jboss-user mailing list