In trunk I think you can use connective constraints:<br><br>$a : Person(age &gt; 35 | &lt; 25, zipCode == 23546 | == 68590)<br>then<br>$a.setStatus(&quot;KT&quot;);<br><br><br><br><div><span class="gmail_quote">On 2/18/07, 
<b class="gmail_sendername">
Bill Zhang</b> &lt;<a href="mailto:billzhang2006@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">billzhang2006@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hello,<br><br>I am a new Drools user trying to convert the following simple logic into DRL:<br><br>IF (Person.Age &gt; 35 OR Person.Age &lt; 25) AND (Person.ZipCode = 23546 or<br>Person.ZipCode = 68590)<br>THEN<br>Person.Status

 = &quot;KT&quot;;<br><br>I found that it is not easy to convert the above logic into ONE DRL rule.<br><br>I tried something like this<br><br>when<br>$a: Person(age&gt;35) or Person (age&lt;25)<br>$b: Person(Zipcode==23456) or Person (ZipCode == 68590)
<br>$c: $a and $b<br>Then<br>$c.setStatus(&quot;KT&quot;)<br><br>But looks like I can not use<br>$c: $a and $b<br>becaue in Drools, you can only bind variable to column, not to other varaibles.<br><br>Please advise how to do this. I would imagine this should be quite
<br>simple, maybe I missed something quite obvious.<br><br>I know that I can write custom Java method to do this, but if I do<br>that, I suppose I lose the power of RETEOO pattern matching (pattern resuing,<br>etc.). So I prefer not to do that.
<br><br>I also understand I can break the above logic into 4 rules and that<br>would be quite easy, but our business user is not used to think in<br>that way. Also, we have more complex logic than the above. So what I<br>

want is to see if there is a way to convert this<br>kind of logic in ONE DRL rule.<br><br>Thanks in advance.<br><br>Bill<br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.jboss.org/mailman/listinfo/rules-users
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Steven Williams
<br><br>Supervising Consultant<br><br>Object Consulting<br>Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501<br><a href="mailto:stevenw@objectconsulting.com.au" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
stevenw@objectconsulting.com.au</a><br><a href="http://www.objectconsulting.com.au" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
www.objectconsulting.com.au</a><br><br>consulting | development | training | support<br>our experience makes the difference