Re: [rules-users] How to hold a Collection of Objects in memory for processing ?.
Yeah that seems to be the way to go Solution was to use collect My Rule now looks like the follows $alert : Alert() $list : ArrayList() from collect (Alert ( sourceName==DATA) from $alert.alerts) Now $list is holding the entire Colection of Objects. - Thanks for the support ...!!! VR -- View this message in context: http://drools.46999.n3.nabble.com/How-to-hold-a-Collection-of-Objects-in-memory-for-processing-tp4023537p4023549.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
[rules-users] How to hold a Collection of Objects in memory for processing ?.
Hi All, This is the rule defined in my drl file rule Entry salience 10 when $alert : Alert() $list : Alert ( sourceName==DATA) from $alert.alerts // 1. Iterate over List of ALerts then checkForAlertDescription($list);// 2. I am passing one Alert per match end Is there a way to hold the *Entire List at Step one * in the Drools Memory so that i can take the Entire list for processing with in the function defined at Step 2 Instead of the single alert that i have at the moment Any suggestions would be helpful. Drools v 5.4.0 Final - Thanks for the support ...!!! VR -- View this message in context: http://drools.46999.n3.nabble.com/How-to-hold-a-Collection-of-Objects-in-memory-for-processing-tp4023537.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
Re: [rules-users] How to hold a Collection of Objects in memory for processing ?.
Have you tried collect? something like... $alertFromDATA : Alert ( sourceName==DATA) from $alert.alerts $list : ArrayList() from collect ($alertFromDATA) You may even be able to combine both statements into one. Dont know if this will work, but you can try. -- View this message in context: http://drools.46999.n3.nabble.com/How-to-hold-a-Collection-of-Objects-in-memory-for-processing-tp4023537p4023539.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