<p>From my experience, if you want call a method from then clause, it has to be static method.<br>
Bye bye,</p>
<p>Matteo Cusmai</p>
<div class="gmail_quote">Il giorno 07/mar/2012 18:10, &quot;womuji&quot; &lt;<a href="mailto:cmregister@gmail.com">cmregister@gmail.com</a>&gt; ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
We are upgrading Drools from 5.1 to 5.3, and running into some issue when<br>
invoking a Java method with<br>
String variable arguments:<br>
<br>
methodA(String... params)<br>
<br>
how do we invoke this in a drl file? We used to call it in 5.1 as:<br>
<br>
objA.methodA({&quot;string1&quot;});<br>
<br>
and it works fine. Now in 5.3, it complains that<br>
<br>
&quot;unable to resolve method using strict-mode:<br>
objA.methodA([Ljava.lang.Object;)]&quot;<br>
<br>
If we tried objA.methodA(new String[]{&quot;string1&quot;});<br>
it complains that<br>
&quot;unable to resolve method using strict-mode:<br>
objA.methodA([Ljava.lang.String;)]&quot;<br>
<br>
It passes the rule loading if we change to :<br>
<br>
objA.methodA(&quot;string1&quot;);<br>
<br>
but when actually running the rule, we are getting error saying<br>
&quot; unable to resolve method methodA(java.lang.String)&quot;<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/how-to-invoke-java-method-with-variable-arguments-from-drl-file-tp3807314p3807314.html" target="_blank">http://drools.46999.n3.nabble.com/how-to-invoke-java-method-with-variable-arguments-from-drl-file-tp3807314p3807314.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div>