<!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.16915" name=GENERATOR></head><BODY>
<DIV>
<DIV><SPAN class=856125916-03112009><FONT face=Verdana size=2>Hi 
All,</FONT></SPAN></DIV>
<DIV><SPAN class=856125916-03112009><FONT face=Verdana size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=856125916-03112009><FONT face=Verdana size=2>I am trying to 
compile a drool rule using MVEL dialect and getting the following weird error. 
</FONT></SPAN></DIV>
<DIV><SPAN class=856125916-03112009><FONT face=Verdana size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=856125916-03112009><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2>
<P align=left>Unable to determine the used declarations.</P>
<P align=left>unbalanced braces (near code: &lt;&lt; ... core1_entityOID); 
...&gt;&gt;) (position: 33) : [Rule name=Legacy ETSDB Rule, agendaGroup=MAIN, 
salience=0, no-loop=false]</P></FONT></FONT><U><FONT color=#000080 size=2><FONT color=#000080 size=2>
<P>org.mvel.ParseException</U></FONT></FONT><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2>: unbalanced braces (near code: &lt;&lt; ... 
core1_entityOID); ...&gt;&gt;) (position: 33)Unable to build expression for 
'consequence'</P></FONT></FONT></FONT></FONT><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2></FONT></FONT></SPAN></DIV>
<DIV><FONT color=#ff0000 size=2><FONT color=#ff0000 face=Verdana size=2></FONT></FONT><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2><FONT face=Verdana></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><SPAN class=856125916-03112009><FONT face=Verdana size=2>The code I am 
trying to compile is:</FONT></SPAN></DIV>
<DIV><FONT color=#ff0000 face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><FONT size=2><FONT color=#0000ff face=Verdana>package 
S_124<BR>import com.ms.ieddata.dataQuality.violation.Violation;<BR>import 
com.ms.ieddata.etsdb.model.EtsExecution_core;<BR>import 
com.ms.ieddata.etsdb.model.EtsExecutionOrder_core;<BR>global java.util.HashSet 
violations;<BR>global java.util.HashSet 
violationKeys;</FONT></FONT></FONT></DIV><FONT><FONT><FONT>
<DIV><BR><FONT color=#0000ff face=Verdana size=2>dialect "mvel"</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT><BR><FONT color=#0000ff face=Verdana size=2>rule "Legacy ETSDB Rule"</FONT></DIV>
<DIV><BR><FONT color=#0000ff face=Verdana size=2>when<BR>EtsExecution_core1:EtsExecution_core(crossInd == "1" , 
lastCapacity != "3" , lastDestinationID not in 
("EUREX","IDEM","MEFF","LIFFE"))<BR>EtsExecutionOrder_core1:EtsExecutionOrder_core(entityOID 
== EtsExecution_core1.parentOID , exDestination in ("I","L") , swapComponentType 
!= "swaps" , orderCapacity not in 
("D","R","X","L","E","T","C","O","P","S"),EtsExecutionOrder_core1_entityOID:entityOID,EtsExecutionOrder_core1_application:application,EtsExecutionOrder_core1_entityVID:entityVID)</FONT></DIV>
<DIV><BR><FONT color=#0000ff face=Verdana size=2>then</FONT></DIV>
<DIV><BR><FONT color=#0000ff face=Verdana size=2>String 
key="S-124_EtsExecution_core" + "_entityVID_" + 
"EtsExecutionOrder_core1_entityVID" + "_application_" + 
"EtsExecutionOrder_core1_application" + "_entityOID_" + </FONT></DIV>
<DIV><FONT color=#0000ff face=Verdana size=2>"EtsExecutionOrder_core1_entityOID";</FONT></DIV>
<DIV><BR><FONT color=#0000ff face=Verdana size=2>vPresent = 
violationKeys.contains(key);</FONT></DIV>
<DIV><BR><FONT color=#0000ff face=Verdana size=2>if (!vPresent)<BR>{<BR><SPAN class=856125916-03112009>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>&nbsp;violation = new 
Violation();<BR><SPAN class=856125916-03112009>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>&nbsp;violation.putRuleActionAttribute("ruleId","S-124");<BR><SPAN class=856125916-03112009>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>&nbsp;violation.putRuleActionAttribute("ruleName","Legacy 
ETSDB Rule");<BR><SPAN class=856125916-03112009>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>&nbsp;violation.putRuleActionAttribute("legacyRuleType","1");<BR><SPAN class=856125916-03112009>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>&nbsp;violation.putRuleActionAttribute("entityName","EtsExecution_core");<BR><SPAN class=856125916-03112009>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>&nbsp;violation.putRuleActionAttribute("fieldName","Field");<BR><SPAN class=856125916-03112009>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>&nbsp;violation.putRuleActionAttribute("entityVID",EtsExecutionOrder_core1_entityVID);<BR><SPAN class=856125916-03112009>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>&nbsp;violation.putRuleActionAttribute("application",EtsExecutionOrder_core1_application);<BR><SPAN class=856125916-03112009>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>&nbsp;violation.putRuleActionAttribute("entityOID",EtsExecutionOrder_core1_entityOID);<BR>}</FONT></FONT></FONT></FONT></DIV>
<DIV><FONT color=#0000ff face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><FONT size=2><FONT color=#0000ff face=Verdana>end</FONT></DIV></FONT></FONT>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=856125916-03112009><FONT face=Verdana size=2>The 
code&nbsp;works fine when I use java dialect. Also, if I remove the if statement 
from consequence, the code get compiled in mvel and java dialects. Am I missing 
something obvious here? I am using drools 4.0.1.</FONT></SPAN></DIV>
<DIV><SPAN class=856125916-03112009><FONT face=Verdana size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=856125916-03112009><FONT face=Verdana size=2>Thanks</FONT></SPAN></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><SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 7.5pt">Morgan Stanley | IDEAS Practice 
Areas<BR></SPAN><SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 7.5pt">750 Seventh 
Avenue, 6th Floor | New York, NY&nbsp;&nbsp;10019<BR>Phone: +1 212 
762-4495<BR><A href="mailto:Malay.Shah@morganstanley.com">Malay.Shah@morganstanley.com</A><BR></SPAN></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</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>