<br>&nbsp;&nbsp; Martin,<br><br>&nbsp;&nbsp; I&#39;m not sure I completely understood your problem. An easier way (although not necessarily faster way) of doing it is:<br><br>when<br>&nbsp;&nbsp;&nbsp; A( $session : oA.session )<br>&nbsp;&nbsp;&nbsp; B( oB.session == $session )
<br>then<br><br>&nbsp;&nbsp;&nbsp; Hope it helps.<br><br>&nbsp;&nbsp;&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/12/24, Martin Book &lt;<a href="mailto:m.book@web.de">m.book@web.de</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">











<div link="blue" vlink="purple" lang="DE">

<div>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Hello, </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">i have following problem with defining a rule:</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">- Object type A contains object OA with attribute
session(long).</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">- Object type B contains object OB
with attribute session(long).</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">I would like to get any object of type B that contains
object OB with OB.session==OA.session</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">My LHS looks like this:</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">When</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $a:A()</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OA($sess : session) from $a.getOA()</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $b:B()</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OB(session==$sess)
from $b.getOB()</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Then</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">…</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">The problem is that condition two matches before
condition three and condition three could not be set before condition two. Is
it possible to group the conditions? </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">kind regards and merry Christmas</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Martin</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font></p>

</div>

</div>


<br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" 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>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;JBoss Drools Core Development<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646
<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>