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&...]