<br> The only improvement I can suggest for your rule is to not use collect if you are checking for the non-existance of and object (size == 0). "not" does the job and is much lighter from a performance perspective:<br>
<br>Cluster($ipAddressCollection : ipAddressCollection != null)<br>$ipAddressUsage : IPAddressUsage(guid in (IPAddressUsage.CUSTOMER_MANAGEMENT, <br> IPAddressUsage.CUSTOMER_BACKUP,<br>
IPAddressUsage.CUSTOMER_PRODUCTION,<br> IPAddressUsage.CUSTOMER_HEARTBEAT) )<br>not( IPAddress(ipAddressUsage == $ipAddressUsage) from $ipAddressCollection.ipAddresses )<br>
<br><br> []s<br> Edson<br><br><br><div class="gmail_quote">2008/12/17 David Sinclair <span dir="ltr"><<a href="mailto:dsinclair@chariotsolutions.com">dsinclair@chariotsolutions.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have the when part of a rule<br><br>Cluster($ipAddressCollection : ipAddressCollection != null)<br>$ipAddressUsage : IPAddressUsage(guid in (IPAddressUsage.CUSTOMER_MANAGEMENT,<br> IPAddressUsage.CUSTOMER_BACKUP,<br>
IPAddressUsage.CUSTOMER_PRODUCTION,<br> IPAddressUsage.CUSTOMER_HEARTBEAT))<br>java.util.LinkedList(size == 0) from collect( IPAddress(ipAddressUsage == $ipAddressUsage) from $ipAddressCollection.ipAddresses)<br>
<br>This works fine, but I would like to constrain the IPAddress's usage within the collect, as opposed to joining.<br><br>Anyone know if this is possible?<br><br>thanks<br><br>dave<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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>