Hi,
I have a requirement that needs to convert a level (eg. an Information) to
a higher level (eg. an exception)
The conversion happens on the basis of the number of times Information
occurs ie based on a count. Process to identify Information,to track the
occurrence i.e is count of Information,to convert
Information to Exception and to persist Exception to DB are handled in
rules.
The below given rule is meant to track Information count.
rule "Track Information Count"
no-loop true
when
$alert : Alert(Information == "Y")
$Information : Information( InformationId == $alert.InformationId ,
$alert.currentTimeMillis-lastLoadTime < 60000)
then
debugLog(drools,"Track Information count");
$Information.setMetric($alert.getMetric());
$Information.setObjMetric($alert.getObjMetric());
$Information.incrementCount();
$Information.setLastLoadTime(System.currentTimeMillis());
update($Information);
traceLog(drools,"Information Count : "+$Information.getAffCount());
retract($alert);
end;
--
View this message in context:
http://drools.46999.n3.nabble.com/Memory-Problemwith-instance-of-ReteooSt...
Sent from the Drools: User forum mailing list archive at
Nabble.com.