<br> Juergen,<br><br> Yes, accumulate only supports a single source pattern. I will implement support to multi-pattern as soon as we close the nastiest open bugs in the next few days.<br><br> []s<br> Edson<br><br>
<div><span class="gmail_quote">2007/8/21, Juergen <<a href="mailto:work_registries@web.de">work_registries@web.de</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It appears as if accumulate does support only a single pattern CE as<br>source pattern, e.g.:<br><br>Number() from accumulate(<br> Cheese(<br> price : price<br> ),<br> sum( price )<br>)
<br><br>Is it possible to have more than one pattern in the source pattern, e.g.:<br><br>Number() from accumulate(<br> Cheese(<br> price : price,<br> type : type<br> )<br> Person(
<br> favouriteCheese == type,<br> age > 30<br> ),<br> sum( price )<br>)<br><br>The same could be said for collect, but there the problem to specify<br>which item of a matching tuple is to be collected, but this could be
<br>handled recreating collect via accumulate, e.g.:<br><br>Collection() from accumulate(<br> cheese : Cheese(<br> type : type<br> )<br> Person(<br> favouriteCheese == type,
<br> age > 30<br> ),<br> collect( cheese )<br>)<br><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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer
<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>