The activation contains fact handles, and one must use
workingMemory.getObjct( handle )
to obtain the object - at least a consequence exception handler would do this.
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.
-W
I have this rule:
rule "Defrost: Turned On"
when
$reading : SwitchReading( switchOn == true ) from entry-point
"ReadingsStream"
not SwitchReading (this.circuit == $reading.circuit, this after $reading
) from entry-point "ReadingsStream"
not DefrostSwitchOn(this.circuit == $reading.circuit)
then
LOG.info("Defrost switch turned on by reading '" + $reading + "'.");
insert(new DefrostSwitchOn($reading));
end
SwitchReading is an event; DefrostSwitchOn is a POJO fact.
Multiple times I've gotten exceptions where this rule's RHS is called with a
null. The ConsequenceExceptionHandler is supposed to list the facts the RHS
was called with, but it's getting an empty list.
Now, I know my system as it currently stands can take a LONG time between
receiving an event and executing the consequence, primarily when it first
starts and is loading its previous known state. It's entirely believable to
me that the event will have expired before the rule's RHS is called. But
shouldn't the event still be referenced by the Activation?
--
View this message in context: http://drools.46999.n3.nabble.com/Rules-called-with-null-references-tp3477164p3477164.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users