<div dir="ltr">תמיד נחמד לראות עוד ישראלים באינטרנט.<br><br><div class="gmail_quote">On Fri, Jan 16, 2009 at 6:57 PM,  <span dir="ltr">&lt;<a href="mailto:kfs2@chryslerfinancial.com">kfs2@chryslerfinancial.com</a>&gt;</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><font face="Courier New" size="2">I think I found the answer to my question:</font>
<br>
<br><font face="Courier New" size="2">rule &quot;Test&quot;</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; </font><font face="Courier New" size="2" color="#a00000"><b>when</b></font><font face="Courier New" size="2">
&nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; CoApplicant( $relationship : relationship
)</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; Contract ( $state : state )</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </font><font face="Courier New" size="2" color="#a00000"><b>eval</b></font><font face="Courier New" size="2">
($relationship == </font><font face="Courier New" size="2" color="#008000">&quot;S&quot;</font><font face="Courier New" size="2">
|| $state == </font><font face="Courier New" size="2" color="#008000">&quot;CO&quot;</font><font face="Courier New" size="2">
|| $state == </font><font face="Courier New" size="2" color="#008000">&quot;IL&quot;</font><font face="Courier New" size="2">)</font>
<br><font face="sans-serif" size="2">...</font>
<br>
<br><font face="sans-serif" size="2">Thanks</font>
<br>
<br>
<br>
<table width="100%">
<tbody><tr valign="top">
<td width="40%"><font face="sans-serif" size="1"><b><a href="mailto:kfs2@chrysler.com" target="_blank">kfs2@chrysler.com</a></b> </font>
<br><font face="sans-serif" size="1">Sent by: <a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a></font>
<p><font face="sans-serif" size="1">01/16/2009 11:40 AM</font>
</p><table border="1">
<tbody><tr valign="top">
<td bgcolor="white">
<div align="center"><font face="sans-serif" size="1">Please respond to<br>
Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>&gt;</font></div></td></tr></tbody></table>
<br>
</td><td width="59%">
<table width="100%">
<tbody><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">To</font></div>
</td><td><font face="sans-serif" size="1"><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a></font>
</td></tr><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">cc</font></div>
</td><td>
</td></tr><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">Subject</font></div>
</td><td><font face="sans-serif" size="1">[rules-users] or condition - subrules</font></td></tr></tbody></table>
<br>
<table>
<tbody><tr valign="top">
<td>
</td><td></td></tr></tbody></table>
<br></td></tr></tbody></table><div><div></div><div class="Wj3C7c">
<br>
<br>
<br><font face="Courier New" size="2"><br>
I understand that as this rule is written below it will be compiled into
2 subrules which both fire. &nbsp;I searched the archives and found a post
where Mark Proctor suggested &quot;</font><tt><font size="3">Bind each pattern,
and do the || field constraints in an eval.&quot;. I&#39;m new to Drools, can
someone elaborate on how I would do that with the rule below?</font></tt><font size="3">
<br>
</font><font face="Courier New" size="2"><br>
rule &quot;Test&quot; &nbsp; &nbsp; &nbsp; &nbsp;</font><font size="3"> </font><font face="Courier New" size="2"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;when &nbsp; &nbsp; &nbsp; &nbsp;</font><font size="3">
</font><font face="Courier New" size="2"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(CoApplicant( relationship
== &quot;S&quot; ) or (Contract ( state in (&quot;CO&quot;, &quot;IL&quot;))))</font><font size="3">
</font><font face="Courier New" size="2"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;then </font><font face="sans-serif" size="2"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;...</font><font size="3"> <br>
</font><font face="sans-serif" size="2"><br>
Thanks</font><font size="3"> <br>
</font></div></div><font face="sans-serif" size="2"><br>
Kent &nbsp; &nbsp;</font><tt><font size="2">_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
</font></tt><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><tt><font size="2">https://lists.jboss.org/mailman/listinfo/rules-users<br>
</font></tt><font face="sans-serif" size="2"> &nbsp;</font></a>
<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>Cheers, <br>Maxim Veksler<br><br>&quot;Free as in Freedom&quot; - Do u GNU ?<br>
</div>