<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML DIR=ltr><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"></HEAD><BODY>
<DIV><FONT face=Arial size=2>Edson,</FONT></DIV>
<DIV><FONT face=Arial size=2>am getting the following output</FONT></DIV>
<DIV><FONT face=Arial size=2>[ b, a ]</FONT></DIV>
<DIV><FONT face=Arial size=2>[ a, b ]</FONT><BR>only the order of the output is 
different. so if i check a equal to b according to the cross product law the 
then part execute 2 times?</DIV>
<DIV>thats y i check the reference in the then part.</DIV>
<DIV>&nbsp;</DIV>
<DIV>how to use eval to&nbsp; variable comparison of objects in a single 
line</DIV>
<DIV><BR>Thanks and&nbsp; regs,</DIV>
<DIV>Basha</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#000000 
size=2>/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT></DIV>
<DIV><FONT face=Arial color=#000000 size=2>Message: 3<BR>Date: Sat, 19 May 2007 
09:53:29 -0300<BR>From: "Edson Tirelli" &lt;tirelli@post.com&gt;<BR>Subject: Re: 
[rules-users] [rule-users]how to create object 
properties<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; single stmnt<BR>To: "Rules Users List" 
&lt;rules-users@lists.jboss.org&gt;<BR>Message-ID:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;e6dd5ba30705190553p1f5f794ct91ad250fb1ad3753@mail.gmail.com&gt;<BR>Content-Type: 
text/plain; charset="iso-8859-1"<BR><BR>&nbsp;&nbsp;&nbsp; 
Sikkandar,<BR><BR>&nbsp;&nbsp;&nbsp; In 3.0.6, if you have 2 strings in the 
working memory ("a" and "b" ) and<BR>you write:<BR><BR>rule "cross 
product"<BR>when<BR>&nbsp;&nbsp;&nbsp; $s1: String()<BR>&nbsp;&nbsp;&nbsp; $s2: 
String()<BR>then<BR>&nbsp;&nbsp;&nbsp; System.out.println("[ "+$s1+", "+$s2+" 
]");<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<BR>test this specific situation are working fine. Plz let us know if 
it is<BR>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><BR>&nbsp;&nbsp; Regarding 
your second question, comparing properties of the same object<BR>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>2007/5/19, Sikkandar Nawabjan 
&lt;Sikkandar.Nawabjan@ustri.com&gt;:<BR>&gt;<BR>&gt; Hi ,<BR>&gt; The very 
reason i used to compare two object reference is that i got then<BR>&gt; 
executed multiple time when i do duplicate check between object 
properties.<BR>&gt; so i beleive the pattern match happen more than a 
time<BR>&gt; for example<BR>&gt;&nbsp; 
when<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$obj1:object($code:code,$stdate:startdate);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$obj2:object(code==$code,startdate=$stdate);<BR>&gt;&nbsp; then<BR>&gt; 
if(obj1!=obj2)<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
System.out.println("Fired");<BR>&gt;<BR>&gt; My questions are<BR>&gt;<BR>&gt; 1) 
In 3.0.6 is there any other way to avoid this multiple check other than<BR>&gt; 
using eval(which affects performance i beleive). i can't use this 
operator<BR>&gt; in 3.0.6<BR>&gt;<BR>&gt; 2) related to this i have one more 
query. how to check properties within<BR>&gt; the object itself<BR>&gt;<BR>&gt; 
for example i want to do<BR>&gt;&nbsp; 
when<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$obj1:object($code:code,$stdate:startdate,$enddate:enddate &gt; $stdate,<BR>&gt; 
reasoncode == $code);<BR>&gt;&nbsp; then<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
System.out.println("Fired");<BR>&gt; i beleive the above throws error in 3.0.6 
(nullpointer related to alpha<BR>&gt; node)<BR>&gt;<BR>&gt; Earlier reply is 
highly appreciated<BR>&gt;<BR>&gt; Thanks and Regs,<BR>&gt; 
Bassha<BR>&gt;<BR>&gt;<BR></DIV></FONT></BODY></HTML>