Not sure i fully understand the approach, Can you elaborate the same via a
mock example please.
> "insert the facts into Working Memory as they arrive and
after the last
> one."
Do you mean the Batch of alerts needs to be explictly moved to the WM
somehow ?.
*My DRL snapshot*
rule "CORRELATION"
salience 1
when
$alert : Alert()
$list : ArrayList() from collect (Alert ( sourceName=="NETWORK")
from $alert.alerts)
then
checkForAlertDescription($list,drools.getWorkingMemory(),$alert);
//Update the alert list
end
function void checkForAlertDescription(ArrayList list,WorkingMemory wm,Alert
alert) {
/// i update the alert array list via fetching the list i received from the
rule above/
ArrayList<Alert> alist =new ArrayList<Alert>();
for(int i=0;i<list.size();i++){
if( ((Alert)list.get(i)).getAlertDescription().contains("ERR"))
alist.add((Alert)list.get(i));
}
alert.setAlerts(list);
}
-----
Thanks for the support ...!!!
VR
--
View this message in context:
http://drools.46999.n3.nabble.com/How-to-Compute-against-WorkingMemory-in...
Sent from the Drools: User forum mailing list archive at
Nabble.com.