[rules-users] Calling a method with varargs

janders andersenjason+forum at gmail.com
Tue Apr 12 13:36:47 EDT 2011


Apologies, I solved my own problem after banging my head for a spell.
I just needed to surround the varargs portion of the method arguments
with curly braces { } to force the arguments into an array. The new
consequence clause looks like so:


$explanation.addMessage(1, "%s Quantity = %,d", {$notice.dispositionCode,
$notice.quantity});


>From what I could tell reading MVEL's site, they don't seem to support
varargs but it will still work if the arguments are explicitly wrapped
in an array.


Cheers,


Jason

--
View this message in context: http://drools.46999.n3.nabble.com/Calling-a-method-with-varargs-tp2812191p2812327.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110412/73b36a56/attachment.html 


More information about the rules-users mailing list