<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.hoenzb
        {mso-style-name:hoenzb;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">MVEL2-2.1.0.drools4.jar (packaged with Drools 5.3 final)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
<b>On Behalf Of </b>Edson Tirelli<br>
<b>Sent:</b> Monday, February 13, 2012 5:48 PM<br>
<b>To:</b> Rules Users List<br>
<b>Subject:</b> Re: [rules-users] Using Character typed properties in Drool 5.3<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal">&nbsp; &nbsp;Which version of MVEL are you using? It looks like a regression. I will ping Mario to take a look.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">&nbsp; &nbsp;Edson<o:p></o:p></p>
<div>
<p class="MsoNormal">On Mon, Feb 13, 2012 at 6:45 PM, Welsh, Armand &lt;<a href="mailto:AWelsh@statestreet.com">AWelsh@statestreet.com</a>&gt; wrote:<o:p></o:p></p>
<p class="MsoNormal">Correction:<br>
<br>
Even using Character.valueOf('Y') does not work anymore in Drools 5.3. &nbsp;The validate works, but the compile steps fails because Drools is treating 'Y' as a String. &nbsp;However, in Drools 5.2 and prior, 'Y' was properly casted to a Character when the property it
 was being compared to was a property of type Character.<br>
<br>
If anyone has any insight on where the documentation address this change in behavior, I would appreciate some guidance. &nbsp;I am trying to re-standardize how our rules are coded for evaluating Character typed properties.<br>
<span style="color:#888888"><br>
<span class="hoenzb">Armand</span></span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
-----Original Message-----<br>
From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>] On Behalf Of Welsh, Armand<br>
Sent: Monday, February 13, 2012 3:16 PM<br>
To: Rules Users List<br>
Subject: [rules-users] Using Character typed properties in Drool 5.3<br>
<br>
Community,<br>
<br>
In drools 5.2 I had the following LHS&quot;<br>
<br>
when<br>
&nbsp; &nbsp; &nbsp; &nbsp;BloombergColumn (columnName == &quot;CRNCY&quot;, $cur : stringValue != null)<br>
&nbsp; &nbsp; &nbsp; &nbsp;Country (currency == $cur, emergingMkt == 'Y' || countryCode in (&quot;BH&quot;,&quot;HR&quot;,&quot;CZ&quot;,&quot;EE&quot;,&quot;HK&quot;,&quot;HU&quot;,&quot;IL&quot;,&quot;KR&quot;,&quot;KW&quot;,&quot;MO&quot;,&quot;OM&quot;,&quot;QA&quot;,&quot;SA&quot;,&quot;SG&quot;,&quot;SK&quot;,&quot;SI&quot;,&quot;TT&quot;))<br>
<br>
<br>
I am switching to Drool 5.3, and Drools Guvnor reports the following error upon validate (or compile):<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp;[bum_code_value.currency 01] Unable to Analyse Expression emergingMkt == 'Y' || countryCode == &quot;BH&quot; || countryCode == &quot;HR&quot; || countryCode == &quot;CZ&quot; || countryCode == &quot;EE&quot; || countryCode == &quot;HK&quot; || countryCode == &quot;HU&quot; || countryCode == &quot;IL&quot; || countryCode
 == &quot;KR&quot; || countryCode == &quot;KW&quot; || countryCode == &quot;MO&quot; || countryCode == &quot;OM&quot; || countryCode == &quot;QA&quot; || countryCode == &quot;SA&quot; || countryCode == &quot;SG&quot; || countryCode == &quot;SK&quot; || countryCode == &quot;SI&quot; || countryCode == &quot;TT&quot;: [Error: Comparison operation requires compatible
 types. Found class java.lang.Character and class java.lang.String] [Near : {... == &quot;SK&quot; || countryCode == &quot;SI&quot; || countryCode == &quot;TT&quot; ....}] ^ [Line: 7, Column: 28]<br>
<br>
Looking at the emergingMkt in my data model, I see that it is defined as a Character. &nbsp;If I change my LHS to:<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp;BloombergColumn (columnName == &quot;CRNCY&quot;, $cur : stringValue != null)<br>
&nbsp; &nbsp; &nbsp; &nbsp;Country (currency == $cur, emergingMkt == Character.valueOf('Y') || countryCode in (&quot;BH&quot;,&quot;HR&quot;,&quot;CZ&quot;,&quot;EE&quot;,&quot;HK&quot;,&quot;HU&quot;,&quot;IL&quot;,&quot;KR&quot;,&quot;KW&quot;,&quot;MO&quot;,&quot;OM&quot;,&quot;QA&quot;,&quot;SA&quot;,&quot;SG&quot;,&quot;SK&quot;,&quot;SI&quot;,&quot;TT&quot;))<br>
<br>
<br>
Then the validate passes.<br>
<br>
Was this change in behavior intentional? &nbsp;I don't see a reference to this change in the Drools 5.3 documentation, and this makes for a harder to read rule for our Drools analysts.<br>
<br>
Thanks in advance,<br>
Armand<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal">-- <br>
&nbsp; Edson Tirelli<br>
&nbsp; JBoss Drools Core Development<br>
&nbsp; JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><o:p></o:p></p>
</div>
</div>
</body>
</html>