You are inserting the collected lists and printing them later, with
low salience. The previously shown rule printed the collected facts on
the fly, which will fire the rule repeatedly and visibly. The new
solution still fires the collecting rule repeatedly, but you don't see
that.
-W
On 20/12/2
I'm not sure what I did earlier, but when executing the below rules, I get
the desired results. I insert 20 Alert objects and the rule collects alerts
according to a specific case number, rules and output below
Rules
rule 'Group alerts for a specific case'
dialect 'java'
when
Alert( $case
Find some other attribute or attribute combination with the required
properties: unique and ordered.
-W
On 20/12/2012, devan.vanree...@gmail.com wrote:
> Hi laune, thanks for your response, the alert no is not unique, diferrent
> cases may have the same alert no.
>
>
>
> --
> View this message in
Hi laune, thanks for your response, the alert no is not unique, diferrent
cases may have the same alert no.
--
View this message in context:
http://drools.46999.n3.nabble.com/Collecting-items-in-a-List-tp4021256p4021259.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_
Assuming that you call kSession.fireAllRules() only once after the insertion
of all facts, you have to select a single representative for all Alert facts
with identical case number.
Again assuming that the alertNo is unique, you can write
when
Alert( $caseNumber : caseNumber, $alertNo: alertN
Id like to collect all the Alert intances that have the same case number as
seperate lLists
--
View this message in context:
http://drools.46999.n3.nabble.com/Collecting-items-in-a-List-tp4021256p4021257.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_
Hi there,
I have checked existing posts and able to find problems which are similar to
mine but not exactly.
I have an Alert object as per below, several alert instances may have the
same caseNumber
I am trying to collect all the Alert instances that have the same
caseNumber, the rule is below, t