<!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">
I think it would be like this:<br>
<br>
rule "Test"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ca: CoApplicant()<br>
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; $co: Contract()<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eval ( $c1.getRelationship().equals("S") || <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $co.getState().equals("CO") || <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $co.getState().equals("IL") ))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ... <br>
I am no expert but you also might be able to achieve what you want a
little more efficiently with a global that ensures the consequence only
executes once:<br>
<br>
global boolean flag = true;<br>
rule "Test"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (CoApplicant( relationship == "S" ) or (Contract (
state in ("CO", "IL"))))<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eval( flag )<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<br>
&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flag = false;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ... <br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:kfs2@chryslerfinancial.com">kfs2@chryslerfinancial.com</a> [1/16/2009 11:35 AM] wrote:
<blockquote
 cite="mid:OF442031F9.0C294D82-ON85257540.005B1612-85257540.005B0CC1@wkamerica.notes.chrysler.com"
 type="cite"><br>
  <font face="Courier New" size="2">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 "</font><tt><font
 size="3">Bind
each pattern, and do the || field constraints in an eval.". I'm new
to Drools, can someone elaborate on how I would do that with the rule
below?</font></tt>
  <br>
  <br>
  <font face="Courier New" size="2">rule "Test" &nbsp; &nbsp;
&nbsp; &nbsp;</font>
  <br>
  <font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; when
&nbsp; &nbsp; &nbsp; &nbsp;</font>
  <br>
  <font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; (CoApplicant( relationship == "S"
) or (Contract ( state in ("CO", "IL"))))</font>
  <br>
  <font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; then
  </font><br>
  <font face="sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; ...</font>
  <br>
  <br>
  <font face="sans-serif" size="2">Thanks</font>
  <br>
  <br>
  <font face="sans-serif" size="2">Kent &nbsp; &nbsp;</font>
  <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>
</body>
</html>