[rules-users] What may go in the Action when dialect is java

jsk at orwtech.dk jsk at orwtech.dk
Thu Aug 27 03:33:10 EDT 2009


Hi

For some time I have been struggling to complete my Drools workflow
without succes.

I am trying to access static methods on som java classes but for some
reason i keep getting NoSuchMethodException when switching the dialect
from "mvel" to "java" to be able to call this methods.

What I have at runtime is a message variable containing a campaign class
instance which I want to parse on to my static method for it to return an
campaign information class instance to me.

Which I then set in a global variable that I read outside the knowledge
session.

The global variable is defined like this:

global com.test.CampaignResult result

The flow variable is defined like this:

com.test.jpa.Message msg;

My code lookes like this:

Campaign c = msg.getCampaign();
CampaignInfo info = CampaignHelper.getCampaignInfo(c);
result.setCampaignInfo(info);

My Drools is 5.0.1

Can anybody help me on getting this to work?

Best regards

Jesper




More information about the rules-users mailing list