Thanks a lot Mark, it works.
 
Have a good day. :)
 
Yang

 
On 8/7/07, Mark Proctor <mproctor@codehaus.org> wrote:
There is no standard api for this, you would have to get your hands dirty with the source. Look at JavaRuleClassBuilder and you can see where to put your printouts.

Mark
Yang Song wrote:
Greetings everyone,
 
Does anyone know how to dump the class generated from .drl file to disk? Or even better if the generated Java source file can be dumped?
 
Looking for some hints here, I got a NPE when firing the rules. However, it is really hard to find out why the NEP was thrown...  If I can have the dumped class file, then I can be disassemble it back to Java code.
 
To debug this rule in Eclipse is a bit difficult here, because the project is a little "big" and we usually use logging to do debugging...
 
java.lang.NullPointerException
        at monitor.Rule_ftp_other_host_alarm_0.consequence(Rule_ftp_other_host_alarm_0.java:23)
        at monitor.Rule_ftp_other_host_alarm_0ConsequenceInvoker.evaluate(Rule_ftp_other_host_alarm_0ConsequenceInvoker.java:26)
        at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:545)
        at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:509)
        at org.drools.common.AbstractWorkingMemory.fireAllRules (AbstractWorkingMemory.java:430)
        at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:392)
        at com.monitor.ruleengine.InferenceMachine.fireAllRules(InferenceMachine.java :400)
        at com.monitor.ruleengine.InferenceMachine.run(InferenceMachine.java:314)
        at java.lang.Thread.run(Thread.java:595)
 
Thanks very much,
Yang

_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

 

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users