As far as I know, these 2 functions already exist in 5.1.1. Don't they?

Best Regards,

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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


2011/11/16 Bruno Freudensprung <bruno.freudensprung@temis.com>
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:
  • collectList
  • collectSet
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



_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users