The activation contains fact handles, and one must use<br> workingMemory.getObjct( handle ) <br>to obtain the object - at least a consequence exception handler would do this.<br><br>It is debatable whether long delays are in order when an application is using real-time event processing. Time-stamped inserts should not be done before the backlog of restoring everything has been completed.<br>
<br>-W<br><br><div class="gmail_quote">On 3 November 2011 14:34, Robert Crawford <span dir="ltr"><<a href="mailto:crawford@kloognome.com">crawford@kloognome.com</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;">
I have this rule:<br>
<br>
rule "Defrost: Turned On"<br>
when<br>
$reading : SwitchReading( switchOn == true ) from entry-point<br>
"ReadingsStream"<br>
not SwitchReading (this.circuit == $reading.circuit, this after $reading<br>
) from entry-point "ReadingsStream"<br>
not DefrostSwitchOn(this.circuit == $reading.circuit)<br>
then<br>
LOG.info("Defrost switch turned on by reading '" + $reading + "'.");<br>
insert(new DefrostSwitchOn($reading));<br>
end<br>
<br>
SwitchReading is an event; DefrostSwitchOn is a POJO fact.<br>
<br>
Multiple times I've gotten exceptions where this rule's RHS is called with a<br>
null. The ConsequenceExceptionHandler is supposed to list the facts the RHS<br>
was called with, but it's getting an empty list.<br>
<br>
Now, I know my system as it currently stands can take a LONG time between<br>
receiving an event and executing the consequence, primarily when it first<br>
starts and is loading its previous known state. It's entirely believable to<br>
me that the event will have expired before the rule's RHS is called. But<br>
shouldn't the event still be referenced by the Activation?<br>
<font color="#888888"><br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Rules-called-with-null-references-tp3477164p3477164.html" target="_blank">http://drools.46999.n3.nabble.com/Rules-called-with-null-references-tp3477164p3477164.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<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>
</font></blockquote></div><br>