<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt">Trying to figure out the new rule system...<br>but it doesnt work...<span style="font-weight: bold;"><br><br>This is my rule:</span><br><br>package com.prtc.struts.rules<br> <br>import com.prtc.db.MegaTransferObject<br>import java.util.ArrayList<br>import com.prtc.struts.Constants<br> <br><span style="font-style: italic;">rule "cancel_menu"</span><br style="font-style: italic;"><span style="font-style: italic;"> when</span><br style="font-style: italic;"><span style="font-style: italic;"> megaTO : MegaexistMegaTransferObject()</span><br style="font-style: italic;"><span style="font-style: italic;"> megaTO(other_EffectiveOrderTypeDsl != null) and </span><br style="font-style: italic;"><span
style="font-style: italic;"> megaTO(other_EffectiveOrderTypeDsl == Constants.NEW_OPEN_ORDER_TYPE) and</span><br style="font-style: italic;"><span style="font-style: italic;"> megaTO(orders_FkOrderStatusId != null) and </span><br style="font-style: italic;"><span style="font-style: italic;"> megaTO(orders_FkOrderStatusId == Constants.PENDING_TO_BE_SUBMITTED_ORDER_STATUS)</span><br style="font-style: italic;"><span style="font-style: italic;"> </span><br style="font-style: italic;"><span style="font-style: italic;"> then</span><br style="font-style: italic;"><span style="font-style: italic;"> System.out.println("Hello");</span><br style="font-style: italic;"><span style="font-style: italic;">end</span><br><br><span style="font-weight: bold;">part of my
code:<br></span><span style="font-style: italic;"> InputStreamReader ir = new InputStreamReader(RuleBuilderMgr.class.getClassLoader().getResourceAsStream(ruleDrl)); //the null pointer is from this line. </span><br style="font-style: italic;"><span style="font-style: italic;"> builder.addPackageFromDrl(ir);</span><span style="font-weight: bold;"><br></span><br><span style="font-weight: bold;">this is the result:</span><br><span style="font-style: italic;">7661 [main] DEBUG org.apache.commons.jci.compilers.JaninoJavaCompiler - compiling com.prtc.struts.rules.Rule_cancel_menu_0</span><br style="font-style: italic;"><span style="font-style: italic;">7942 [main] DEBUG org.apache.commons.jci.compilers.JaninoJavaCompiler - compile com.prtc.struts.rules.Rule_cancel_menu_0</span><br style="font-style: italic;"><span style="font-style: italic;">8062 [main] DEBUG
org.apache.commons.jci.compilers.JaninoJavaCompiler - compiled com.prtc.struts.rules.Rule_cancel_menu_0</span><br style="font-style: italic;"><span style="font-style: italic;">8062 [main] DEBUG org.apache.commons.jci.compilers.JaninoJavaCompiler - compiling com.prtc.struts.rules.Rule_cancel_menu_0ConsequenceInvoker</span><br style="font-style: italic;"><span style="font-style: italic;">8072 [main] DEBUG org.apache.commons.jci.compilers.JaninoJavaCompiler - compile com.prtc.struts.rules.Rule_cancel_menu_0ConsequenceInvoker</span><br style="font-style: italic;"><span style="font-style: italic;">8092 [main] DEBUG org.apache.commons.jci.compilers.JaninoJavaCompiler - compiled com.prtc.struts.rules.Rule_cancel_menu_0ConsequenceInvoker</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">8102 [main] FATAL com.prtc.struts.util.ConstructServiceAssuranceTreeMenu - Exception in
ShowIspServiceAssuranceAction.execute --> java.lang.NullPointerException</span><br style="font-style: italic;"><span style="font-style: italic;">8102 [main] FATAL com.prtc.struts.util.ConstructServiceAssuranceTreeMenu - java.lang.NullPointerException</span><br style="font-style: italic;"><span style="font-style: italic;"> at com.prtc.struts.util.ConstructServiceAssuranceTreeMenu.construct(ConstructServiceAssuranceTreeMenu.java:74)</span><br style="font-style: italic;"><span style="font-style: italic;"> at com.prtc.lc.rules.managers.RuleTester.test1(RuleTester.java:299)</span><br style="font-style: italic;"><span style="font-style: italic;"> at com.prtc.lc.rules.managers.RuleTester.main(RuleTester.java:54)</span><br><br><br><br><br><br><br><div> </div>Joel G. Rivera-Gonzalez<br>PRT<br><br>"The first 90% of a project takes 90% of the time, the last 10% takes the other 90% of the time" - Murphy's
Law</div></body></html>