-
1. Re: How can a Service Task take integer variable via additional parameters?
krisverlaenen Jun 27, 2011 12:01 PM (in response to brucecui)1 of 1 people found this helpfulHi,
#{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
-
2. Re: How can a Service Task take integer variable via additional parameters?
brucecui Jun 27, 2011 12:20 PM (in response to krisverlaenen)Thanks Kris, I used parameter instead. Just thought maybe this can be handled more smoothly.