<!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' color=#000000 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> when<BR>
$obj1:object($code:code,$stdate:startdate);<BR>
$obj2:object(code==$code,startdate=$stdate);<BR> then</FONT></DIV>
<DIV><FONT face=Arial size=2>if(obj1!=obj2)<BR>
System.out.println("Fired");</FONT></DIV>
<P><FONT face=Arial size=2>My questions are </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'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> when<BR>
$obj1:object($code:code,$stdate:startdate,$enddate:enddate > $stdate,
reasoncode == $code);<BR> then</FONT></DIV>
<DIV><FONT face=Arial size=2>
System.out.println("Fired");</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> </DIV>
<DIV><FONT face=Arial size=2>Earlier reply is highly appreciated</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </P>
<P><FONT face=Arial size=2></FONT> </P>
<DIV><BR></DIV>
<DIV><FONT face=Arial color=#000000 size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#000000 size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#000000 size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#000000 size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#000000 size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#000000 size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#000000
size=2>----------------------------------------------------------------------<BR><BR>Message:
1<BR>Date: Fri, 18 May 2007 09:51:34 -0300<BR>From: "Edson Tirelli"
<tirelli@post.com><BR>Subject: Re: [rules-users] how to check
reference<BR>To: "Rules Users List"
<rules-users@lists.jboss.org><BR>Message-ID:<BR>
<e6dd5ba30705180551y6562b7f6oe5ea173379ebb4c8@mail.gmail.com><BR>Content-Type:
text/plain; charset="iso-8859-1"<BR><BR> 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>
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 "this" keyword to<BR>check
for object identity.<BR><BR> []s<BR>
Edson<BR><BR><BR>2007/5/18, Chris Woodrow
<woodrow.chris@gmail.com>:<BR>><BR>> Hi,<BR>> You can use
eval();<BR>><BR>> when<BR>>
$obj1:object();<BR>>
$obj2:object();<BR>> eval ($obj1!=$obj2);<BR>>
then<BR>>
System.out.println("Fired");<BR>><BR>> Hope this helps<BR>>
Chris<BR></DIV></FONT></BODY></HTML>