<div dir="ltr">Hi ,<br><br>Thanks for your quick reply,<br><br>the problem that these conditions are on different objects for example<br><br>Person(name == "xyz") &&<br>(Cheese(type == "zzz") OR<br>
Address(street == "1") OR<br> Phone (number == "xyz") )<br><br>Thanks again.<br><br>Best Regards,<br><br>Waleed Zedan<br><br><div class="gmail_quote">On Sun, Nov 30, 2008 at 7:03 PM, Edson Tirelli <span dir="ltr"><<a href="mailto:tirelli@post.com">tirelli@post.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br> Are conditions 2-4 applied to the same pattern type? If so, you can use the "||" Field Constraint Connective instead of the "or" Conditional Element:<br>
<br>when<br> Person( name == "Bob" )<br>
Cheese( type == "brie" || size > 2 || price <= 30 )<br>then<br> ...<br>end<br><br> These conditions will not generate new rules as the OR CE does...<br><br> []s<br> Edson<br><br><br><div class="gmail_quote">
2008/11/30 Waleed Zedan <span dir="ltr"><<a href="mailto:wzedan@gmail.com" target="_blank">wzedan@gmail.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;">
<div><div></div><div class="Wj3C7c">
<div dir="ltr">Hi All,<br><br>I have this requirment : Rule A -> Condition 1 AND<br> (Condition 2 OR<br> Condition 3 OR<br>
Condition 4)<br>
The problem is that OR (||) operators in drools are not a short circuiting operators like in Java.<br><br>May you please tell me an approach to handle this situation , i have already tried splitting it on multiple rules ,but i am searching for better approach.<br>
<br>I am using Drools <a href="http://4.0.7." target="_blank">4.0.7.</a><br><br>Thanks.<br><br>Best Regards,<br clear="all"><br>-- <br>Waleed Zedan<br><br><br>
</div>
<br></div></div>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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><font color="#888888"><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" target="_blank">www.jboss.com</a><br>
</font><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>Waleed Zedan<br>Senior Software Developer<br>IT Design & Development Department<br>Dubai Customs<br><br>
</div>