<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><head><META content="text/html; charset=us-ascii" http-equiv="Content-Type">

<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META content="MSHTML 6.00.6000.16850" name=GENERATOR></head><BODY>
<DIV>
<DIV align=left dir=ltr><SPAN class=570572120-03082009><FONT color=#0000ff face=Verdana size=2>Minor correction in the rule:</FONT></SPAN></DIV>
<DIV align=left dir=ltr><SPAN class=570572120-03082009><FONT color=#0000ff face=Verdana size=2></FONT></SPAN>&nbsp;</DIV>
<DIV align=left dir=ltr><SPAN class=570572120-03082009><FONT color=#0000ff face=Verdana size=2>The eval block is:</FONT></SPAN></DIV>
<DIV align=left dir=ltr><SPAN class=570572120-03082009><FONT color=#0000ff face=Verdana size=2></FONT></SPAN>&nbsp;</DIV>
<DIV align=left dir=ltr><SPAN class=570572120-03082009><FONT face=Verdana><FONT color=#0000ff size=2>eval(lastCapacity<SPAN class=570572120-03082009>&nbsp;<FONT color=#ff0000><STRONG>=</STRONG></FONT></SPAN><FONT color=#000000><FONT color=#ff0000><STRONG>=</STRONG></FONT> </FONT>null &amp;&amp; entityOid == 
parentOid &amp;&amp; msgType == "8")</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=570572120-03082009><FONT color=#0000ff face=Verdana size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=570572120-03082009><FONT color=#0000ff face=Verdana size=2>instead of </FONT></DIV>
<DIV><FONT color=#0000ff face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=570572120-03082009><FONT size=2><FONT face=Verdana><FONT color=#0000ff>eval(lastCapacity<SPAN class=570572120-03082009>&nbsp;<FONT color=#ff0000><STRONG>!</STRONG></FONT></SPAN></FONT></FONT></FONT></SPAN><SPAN class=570572120-03082009><FONT size=2><FONT face=Verdana><FONT color=#0000ff><FONT color=#ff0000><STRONG>= </STRONG></FONT>null &amp;&amp; 
entityOid == parentOid &amp;&amp; msgType == 
"8")</FONT></FONT></FONT></SPAN></DIV>
<DIV align=left dir=ltr><FONT color=#0000ff face=Verdana size=2></FONT><FONT color=#0000ff face=Verdana size=2></FONT><FONT color=#0000ff face=Verdana size=2></FONT><FONT color=#0000ff face=Verdana size=2></FONT><BR></DIV></SPAN>
<DIV align=left dir=ltr><SPAN class=570572120-03082009><FONT color=#0000ff face=Verdana size=2>Any help is much appreciated.</FONT></SPAN></DIV>
<DIV align=left dir=ltr><SPAN class=570572120-03082009><FONT color=#0000ff face=Verdana size=2></FONT></SPAN>&nbsp;</DIV>
<DIV align=left dir=ltr><SPAN class=570572120-03082009><FONT color=#0000ff face=Verdana size=2>Thanks</FONT></SPAN></DIV>
<DIV align=left dir=ltr><FONT color=#0000ff face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV style="COLOR: black; FONT-FAMILY: arial"><SPAN style="FONT-SIZE: 10pt">Malay Shah</SPAN><SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 7.5pt"><BR></SPAN></DIV>
<DIV><FONT color=#0000ff face=Verdana size=2></FONT>&nbsp;</DIV><FONT color=#0000ff face=Verdana size=2></FONT><FONT color=#0000ff face=Verdana size=2></FONT><FONT color=#0000ff face=Verdana size=2></FONT><BR>
<DIV align=left class=OutlookMessageHeader dir=ltr lang=en-us>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Shah, Malay (IDEAS) <BR><B>Sent:</B> 
Monday, August 03, 2009 4:18 PM<BR><B>To:</B> 
rules-users@lists.jboss.org<BR><B>Subject:</B> Question on eval 
block<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><SPAN class=949570720-03082009><FONT face=Verdana size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=949570720-03082009><FONT face=Verdana size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=949570720-03082009><FONT face=Verdana size=2>I am trying to use 
eval block in one of the rules and am a bit confused about it. The rule is 
something like this:</FONT></SPAN></DIV>
<DIV><SPAN class=949570720-03082009><FONT face=Verdana size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=949570720-03082009>
<P align=left><FONT face=Verdana size=2>rule 
"LastCapacity"<BR>when<BR>&nbsp;&nbsp;&nbsp; e: 
Execution(lastCapacity:lastCapacity,parentOid:parentOid)<BR>&nbsp;&nbsp;&nbsp; 
eo: 
ExecutionOrder(entityOid:entityOid,msgType:msgType,execType:execType)<BR><STRONG>&nbsp;&nbsp;&nbsp; 
eval(lastCapacity&nbsp;</STRONG><SPAN class=570572120-03082009><FONT color=#0000ff>&nbsp;</FONT><FONT color=#000000><STRONG>!</STRONG></FONT></SPAN><STRONG>= null &amp;&amp; 
entityOid == parentOid &amp;&amp; msgType == "8")</STRONG><BR>then</FONT></P>
<P align=left><SPAN class=949570720-03082009></SPAN><FONT face=Verdana size=2>.<SPAN class=949570720-03082009>.................</SPAN><BR>end</FONT></P>
<P><SPAN class=949570720-03082009><FONT face=Verdana size=2>where Execution and 
ExecutionOrder are 2 objects that are linked by an ID. I expect eval to return 
true for certain sets of objects that I send. But, the above rule exits without 
running the consequence. On the other hand, when I write the rule 
as:</FONT></SPAN></P>
<P><SPAN class=949570720-03082009><FONT face=Verdana size=2>&nbsp;rule 
"LastCapacity"<BR>when<BR>&nbsp;&nbsp;&nbsp; e: 
Execution(lastCapacity:<STRONG>lastCapacity==null</STRONG>,parentOid:parentOid)<BR>&nbsp;&nbsp;&nbsp; 
eo: ExecutionOrder(entityOid:<STRONG>entityOid == parentOid</STRONG>, 
<STRONG>msgType == "8"</STRONG>)<BR>then</FONT></SPAN></P>
<P><SPAN class=949570720-03082009><FONT face=Verdana size=2>.............................<BR>end</FONT></SPAN></P></SPAN></DIV>
<DIV><FONT face=Verdana size=2><SPAN class=949570720-03082009>the rule triggers 
the consequence for same set of objects. I thought that if the expression 
in&nbsp;eval block comes out to be true, the consequence will be triggered. Am I 
missing something obvious here?</SPAN></FONT></DIV>
<DIV><FONT face=Verdana size=2><SPAN class=949570720-03082009></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2><SPAN class=949570720-03082009>Thanks</SPAN></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV style="COLOR: black; FONT-FAMILY: arial"><SPAN style="FONT-SIZE: 10pt">Malay Shah<BR></SPAN></DIV></DIV>
<DIV>
<HR>
</DIV>
<P CLASS="BulletedList" STYLE="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0in; mso-list: none; tab-stops: .5in"><SPAN STYLE="FONT-SIZE: 8pt; COLOR: gray; mso-bidi-font-family: Arial"><FONT COLOR="gray" FACE="Arial" SIZE="1">NOTICE: If received in error, please destroy, and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.&nbsp;We<SPAN STYLE="FONT-SIZE: 7.5pt; COLOR: gray; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"> may monitor and store emails to the extent permitted by applicable law.</SPAN></FONT></SPAN></P>
<DIV></DIV></BODY></HTML>