Re: [rules-users] Collecting / sorting by the number of matches

2009-08-20 Thread KDR
Thank you Dave, point taken. :) If my deadline allows I'll try to do it using AgendaEventListener instead - the All Drools way! :D dave sinclair wrote: Just remember that doing it this way alleviates the author of the rules from having to add that book keeping when creating new rules. This

[rules-users] Collecting / sorting by the number of matches

2009-08-19 Thread KDR
Hi, ta very much everyone for the help so far. Another question - how to sort by number of matches please? Say I have objects A, B, C and D and rules 1 to 5. Each object can match each rule independently e.g. A can match rule 1 and 2, B might match all rules 1 to 5, C might match none, D rules

Re: [rules-users] Collecting / sorting by the number of matches

2009-08-19 Thread David Sinclair
Take a look at the *AgendaEventListener*. It allows you to get callbacks for when a rule has fired. This would allow you to keep track of which rules fire along with the objects that caused it to fire. On Wed, Aug 19, 2009 at 4:27 AM, KDR dr.sopr...@neverbox.com wrote: Hi, ta very much

Re: [rules-users] Collecting / sorting by the number of matches

2009-08-19 Thread KDR
Thank you Dave. I had a look, but it seems I'd still have to track it and process the results in Java rather than using rules, so I guess I'll stick with my original Java solution. Unless there's some way to track it in Drools? Cheers dave sinclair wrote: Take a look at the

Re: [rules-users] Collecting / sorting by the number of matches

2009-08-19 Thread David Sinclair
Just remember that doing it this way alleviates the author of the rules from having to add that book keeping when creating new rules. This may not be a *rule based* solution, but it is a *Drools* solution :) On Wed, Aug 19, 2009 at 10:42 AM, KDR dr.sopr...@neverbox.com wrote: Thank you Dave. I