Hi There,<div>I'm new to drools and i'm having a problem with a rule which has an OR:</div><div><div>/* Rule 25_OFF -------------------------------------------------------------------------------- */</div><div><br>
</div><div>rule "25_OFF"</div><div>� when</div><div>$p1:InferenceFactValue( param!=null, param.parameterName == "sonar_8_cm", $v1:param.valueFloat >= 10 ) or�</div><div>$p2:InferenceFactValue( param!=null, param.parameterName == "sonar_8_cm", $v2:param.valueFloat >= 10 )</div>
<div>� then</div><div>� � InferenceUtils.log( LogLevel.DEBUG, InferenceUtils.DROOLS_RULE, "Global Clock: " + InferenceDateUtils.dateString( globalClock, false ), true, false );</div><div>� � InferenceUtils.log( LogLevel.DEBUG, InferenceUtils.DROOLS_RULE, "\t\tRegra 25_OFF " + "25", true, false );</div>
<div>� � InferenceFactValue[] params = {$p1, $p2};</div><div>� � RuleFire.addEndAlarm( inferenceAgent, droolsEngine, "AlarmPackage", "25", "25", params, globalClock );</div><div>end</div><div>
<br></div><div>No errors in knowledge builder</div><div><br></div><div><br></div><div>What happens is:</div><div><div><br></div><div>org.drools.runtime.rule.ConsequenceException: java.lang.NullPointerException</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23)</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:943)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:885)</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1086)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:660)</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:627)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:183)</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>at pt.holos.dva.agents.inference.process.DroolsInferenceEngine.fireAllRules(DroolsInferenceEngine.java:644)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>at pt.holos.dva.agents.inference.process.DroolsInferenceEngine.receiveDataFromBuffer(DroolsInferenceEngine.java:342)</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>at pt.holos.dva.agents.inference.process.BufferedDataReceiver.sendDataToDrools(BufferedDataReceiver.java:454)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>at pt.holos.dva.agents.inference.process.BufferedDataReceiver.run(BufferedDataReceiver.java:68)</div>
<div>Caused by: java.lang.NullPointerException</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>at org.drools.reteoo.LeftTuple.get(LeftTuple.java:300)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>at AlarmPackage.Rule_25_OFF_0ConsequenceInvoker.evaluate(Rule_25_OFF_0ConsequenceInvoker.java:15)</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:934)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>... 9 more</div>
</div><div><br></div><div><br></div><div>I've tried to see the source code and the declaration in��org.drools.reteoo.LeftTuple.get(LeftTuple.java:300) is null. Can you give me some pointers please?</div><div><br></div>
<div>Thank you,</div><div>Joana P Lopes</div><div><br></div>-- <br><br>LinkedIn -�<span style="font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif;font-size:13px;line-height:15px"><a href="http://pt.linkedin.com/in/joanpl" title="View public profile" name="SafeHtmlFilter_webProfileURL" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;outline-width:initial;outline-style:none;outline-color:initial;font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;text-decoration:underline;color:rgb(0,102,153)" target="_blank">http://pt.linkedin.com/in/joanpl</a></span><br>
My Bla Bla Bla: <a href="http://joanpl.blogspot.com" target="_blank">http://joanpl.blogspot.com</a><br>.......................................................<br>The intuitive mind is a sacred gift and the rational mind is a faithful servant. We have created a society that honors the servant and has forgotten the gift. Albert Einstein.<br>
"Doubt is not a pleasant condition, but certainty is absurd."<br>Voltaire<br><br><br>
</div>