As far as I know, these 2 functions already exist in 5.1.1. Don't they?<br clear="all"><br>Best Regards,<br><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com </a><br>
- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
<br><br><div class="gmail_quote">2011/11/16 Bruno Freudensprung <span dir="ltr"><<a href="mailto:bruno.freudensprung@temis.com">bruno.freudensprung@temis.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>
<div 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 �crit�:
<div class="im"><blockquote 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>� �$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 href="http://www.plugtree.com" target="_blank">http://www.plugtree.com
</a><br>
- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
<br>
</div>
</blockquote>
<br>
</div></div>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>