Hi Wolfgang, hi Estaban,

Many thanks for your insights!
I'll stick to a custom accumulate function since it is more consice than the init/action/result approach.
And since I am using Drools 5.1.1, I'll create functions named collectList and collectSet to be "future proof" :-)

Best regards,

Bruno.

Le 16/11/2011 10:34, Esteban Aliverti a écrit :
You already have 2 accumulate functions to do what you need:
So, your rule will look like this:
   $countries : HashSet(empty == false) from accumulate (City($name matches "X.*", $country : country), collectSet($country))


Best Regards,

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com