<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Hi Wolfgang, hi Estaban,<br>
    <br>
    Many thanks for your insights!<br>
    I'll stick to a custom accumulate function since it is more consice
    than the init/action/result approach.<br>
    And since I am using Drools 5.1.1, I'll create functions named
    collectList and collectSet to be "future proof" :-)<br>
    <br>
    Best regards,<br>
    <br>
    Bruno.<br>
    <br>
    Le 16/11/2011 10:34, Esteban Aliverti a &eacute;crit&nbsp;:
    <blockquote
cite="mid:CAKsR9Q9Brn19x3Ln43PYWr9t4tYR==Wfu4FM7F03At6O_4eD-w@mail.gmail.com"
      type="cite">You already have 2 accumulate functions to do what you
      need:
      <div>
        <ul>
          <li>collectList</li>
          <li>collectSet</li>
        </ul>
        <div>So, your rule will look like this:</div>
        <div>&nbsp; &nbsp;$countries : HashSet(empty == false) from accumulate
          (City($name matches "X.*", $country : country),
          collectSet($country))</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Best Regards,</div>
        <br>
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>
        <br>
        Esteban Aliverti<br>
        - Developer @ <a moz-do-not-send="true"
          href="http://www.plugtree.com" target="_blank">http://www.plugtree.com
        </a><br>
        - Blog @ <a moz-do-not-send="true"
          href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>