<br>&nbsp;&nbsp;&nbsp; Sikkandar,<br><br>&nbsp;&nbsp;&nbsp; In 3.0.6, if you have 2 strings in the working memory (&quot;a&quot; and &quot;b&quot; ) and you write:<br><br>rule &quot;cross product&quot;<br>when<br>&nbsp;&nbsp;&nbsp; $s1: String()<br>&nbsp;&nbsp;&nbsp; $s2: String()<br>
then<br>&nbsp;&nbsp;&nbsp; System.out.println(&quot;[ &quot;+$s1+&quot;, &quot;+$s2+&quot; ]&quot;);<br>end<br><br>&nbsp;&nbsp; The result MUST be:<br><br>[ a, b ]<br>[ b, a ]<br><br>&nbsp;&nbsp; If it is not that, then we have a bug, but our integration tests that test this specific situation are working fine. Plz let us know if it is different for you.
<br>&nbsp;&nbsp; In 4.0, the result must be:<br><br>[ a, b ]<br>
[ b, a ]<br>[ a, a ]<br>[ b, b ]<br><br>&nbsp;&nbsp; So a fact (by default) may match multiple simultaneous patterns.<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; Regarding your second question, comparing properties of the same object is also something we added for 
4.0. In 3.0.x you need eval() too.<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/5/19, Sikkandar Nawabjan &lt;<a href="mailto:Sikkandar.Nawabjan@ustri.com">Sikkandar.Nawabjan@ustri.com</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>
<div><font color="#000000" face="Arial" size="2">Hi 
,</font></div>
<div><font face="Arial" size="2">The very reason i used to compare two object 
reference is that i got then executed multiple time when i do duplicate check 
between object properties. so i beleive the pattern match happen more than a 
time</font></div>
<div><font face="Arial" size="2">for example</font></div>
<div><font face="Arial" size="2">&nbsp;when<br>&nbsp;&nbsp;&nbsp;&nbsp; 
$obj1:object($code:code,$stdate:startdate);<br>&nbsp;&nbsp;&nbsp;&nbsp; 
$obj2:object(code==$code,startdate=$stdate);<br>&nbsp;then</font></div>
<div><font face="Arial" size="2">if(obj1!=obj2)<br>&nbsp;&nbsp;&nbsp;&nbsp; 
System.out.println(&quot;Fired&quot;);</font></div>
<p><font face="Arial" size="2">My questions are&nbsp;</font></p>
<p><font face="Arial" size="2">1) In 3.0.6 is there any other way to avoid this 
multiple check other than using eval(which affects performance i beleive). i 
can&#39;t use this operator in 3.0.6</font></p>
<p><font face="Arial" size="2">2) related to this i have one more query. how to 
check properties within the object itself</font></p>
<p><font face="Arial" size="2">for example i want to do</font></p>
<div><font face="Arial" size="2">&nbsp;when<br>&nbsp;&nbsp;&nbsp;&nbsp; 
$obj1:object($code:code,$stdate:startdate,$enddate:enddate &gt; $stdate, 
reasoncode == $code);<br>&nbsp;then</font></div>
<div><font face="Arial" size="2">&nbsp;&nbsp;&nbsp;&nbsp; 
System.out.println(&quot;Fired&quot;);</font></div>
<div><font face="Arial" size="2">i beleive the above throws error in 3.0.6 
(nullpointer related to alpha node)</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">Earlier reply is highly appreciated</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">Thanks and Regs,</font></div>
<div><font face="Arial" size="2">Bassha</font></div>
<p><font face="Arial" size="2"></font>&nbsp;</p>
<p><font face="Arial" size="2"></font>&nbsp;</p>
<div><br></div>
<div><font color="#000000" face="Arial" size="2"></font>&nbsp;</div>
<div><font color="#000000" face="Arial" size="2"></font>&nbsp;</div>
<div><font color="#000000" face="Arial" size="2"></font>&nbsp;</div>
<div><font color="#000000" face="Arial" size="2"></font>&nbsp;</div>
<div><font color="#000000" face="Arial" size="2"></font>&nbsp;</div>
<div><font color="#000000" face="Arial" size="2"></font>&nbsp;</div>
<div><font color="#000000" face="Arial" size="2">----------------------------------------------------------------------<br><br>Message: 
1<br>Date: Fri, 18 May 2007 09:51:34 -0300<br>From: &quot;Edson Tirelli&quot; 
&lt;<a href="mailto:tirelli@post.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">tirelli@post.com</a>&gt;<br>Subject: Re: [rules-users] how to check 
reference<br>To: &quot;Rules Users List&quot; 
&lt;<a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users@lists.jboss.org</a>&gt;<br>Message-ID:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;<a href="mailto:e6dd5ba30705180551y6562b7f6oe5ea173379ebb4c8@mail.gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">e6dd5ba30705180551y6562b7f6oe5ea173379ebb4c8@mail.gmail.com</a>&gt;<br>
Content-Type: 
text/plain; charset=&quot;iso-8859-1&quot;<br><br>&nbsp;&nbsp; Yes, in 3.0.6 you will need 
eval. But also it is important to remember<br>that by default, in 3.0.6, an 
object will never match more than one pattern.<br>So in the given example, ob1 
and ob2 will always be different and the check<br>is not needed.<br>&nbsp;&nbsp; 
In 4.0, things are a bit different, as by default a single object may<br>match 
more than one pattern at once and we introduced the &quot;this&quot; keyword to<br>check 
for object identity.<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; 
Edson<br><br><br>2007/5/18, Chris Woodrow 
&lt;<a href="mailto:woodrow.chris@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">woodrow.chris@gmail.com</a>&gt;:<br>&gt;<br>&gt; Hi,<br>&gt; You can use 
eval();<br>&gt;<br>&gt; when<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
$obj1:object();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
$obj2:object();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; eval ($obj1!=$obj2);<br>&gt; 
then<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
System.out.println(&quot;Fired&quot;);<br>&gt;<br>&gt; Hope this helps<br>&gt; 
Chris<br></font></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;Software Engineer - JBoss Rules Core Developer<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>