<!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 bgcolor="#ffffff" text="#000000">
Waleed Zedan wrote:
<blockquote
cite="mid:92d901a00811301953r55521e55ya97bf8c8192b92fb@mail.gmail.com"
type="cite">
<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>
</div>
</blockquote>
Bind each pattern, and do the || field constraints in an eval.<br>
<br>
Mark<br>
<blockquote
cite="mid:92d901a00811301953r55521e55ya97bf8c8192b92fb@mail.gmail.com"
type="cite">
<div dir="ltr"><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 moz-do-not-send="true"
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
moz-do-not-send="true" 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 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 moz-do-not-send="true" 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 moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
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 moz-do-not-send="true"
href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
</font><br>
_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
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>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>