Hey all, I've got a rule in a DRL file that I'm trying to call an object method that contains a varargs parameter. The method signature looks like so:
public void addMessage(int displayPriority, String messageFormat, Object... messageArgs) {
The rule looks like so:
rule "Notice Quantity"
no-loop
when
    $notice : Notice(quantity > 0);
then
    $explanation.addMessage(1, "%s Quantity = %,d", $notice.dispositionCode, $notice.quantity);
end
When I run this rule base, I get this runtime error from the Drools engine:
Caused by: [Error: unable to resolve method: com.package.TriggerExplanation.addMessage(java.lang.Integer, java.lang.String, java.lang.String, java.lang.Integer) [arglength=4]]
[Near : {... Unknown ....}]
This feels very much like either the MVEL engine or Drools can't resolve a method with varargs. I found nothing in any of the documentation and the only thread on these forums that references varargs was a few years old. Can anyone tell me if Drools does/does not support method calls with varargs? Doing this without varargs is going to be a galactic pain in the butt.

Thanks!

Jason


View this message in context: Calling a method with varargs
Sent from the Drools: User forum mailing list archive at Nabble.com.