I have changed the rule logic to use a combination between alertNo and
caseNumber, which seems to have the desired effect after running a couple of
tests. Thank you for your help.
rule 'Group alerts for a specific case'
dialect 'java'
when
Alert( $caseNumber : caseNumber, $alertNo: alertNo )
not Alert( caseNumber == $caseNumber, alertNo < $alertNo )
$list : List( ) from collect($alert : Alert( caseNumber ==
$caseNumber))
then
System.out.println("******Printing list******: ");
System.out.println("******List hashCode: " + $list.hashCode());
for(Object o : $list){
System.out.println(o);
}
end
Output
--
View this message in context:
http://drools.46999.n3.nabble.com/Collecting-items-in-a-List-tp4021256p40...
Sent from the Drools: User forum mailing list archive at
Nabble.com.