Any java code may go on the RHS of a rule. <br><br>When are you getting the NoSuchMethodException? When you are building the knowledge base? If so, sounds like a possible classpath problem. Can you post the stacktrace?<br>
<br><div class="gmail_quote">On Thu, Aug 27, 2009 at 3:33 AM, <span dir="ltr"><<a href="mailto:jsk@orwtech.dk">jsk@orwtech.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi<br>
<br>
For some time I have been struggling to complete my Drools workflow<br>
without succes.<br>
<br>
I am trying to access static methods on som java classes but for some<br>
reason i keep getting NoSuchMethodException when switching the dialect<br>
from "mvel" to "java" to be able to call this methods.<br>
<br>
What I have at runtime is a message variable containing a campaign class<br>
instance which I want to parse on to my static method for it to return an<br>
campaign information class instance to me.<br>
<br>
Which I then set in a global variable that I read outside the knowledge<br>
session.<br>
<br>
The global variable is defined like this:<br>
<br>
global com.test.CampaignResult result<br>
<br>
The flow variable is defined like this:<br>
<br>
com.test.jpa.Message msg;<br>
<br>
My code lookes like this:<br>
<br>
Campaign c = msg.getCampaign();<br>
CampaignInfo info = CampaignHelper.getCampaignInfo(c);<br>
result.setCampaignInfo(info);<br>
<br>
My Drools is 5.0.1<br>
<br>
Can anybody help me on getting this to work?<br>
<br>
Best regards<br>
<br>
Jesper<br>
<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><br>