<div><br></div>   Which version of MVEL are you using? It looks like a regression. I will ping Mario to take a look.<div><br></div><div>   Edson<br><br><div class="gmail_quote">On Mon, Feb 13, 2012 at 6:45 PM, Welsh, Armand <span dir="ltr">&lt;<a href="mailto:AWelsh@statestreet.com">AWelsh@statestreet.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Correction:<br>
<br>
Even using Character.valueOf(&#39;Y&#39;) does not work anymore in Drools 5.3.  The validate works, but the compile steps fails because Drools is treating &#39;Y&#39; as a String.  However, in Drools 5.2 and prior, &#39;Y&#39; 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.  I am trying to re-standardize how our rules are coded for evaluating Character typed properties.<br>

<span class="HOEnZb"><font color="#888888"><br>
Armand<br>
</font></span><div class="HOEnZb"><div class="h5"><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>
        BloombergColumn (columnName == &quot;CRNCY&quot;, $cur : stringValue != null)<br>
        Country (currency == $cur, emergingMkt == &#39;Y&#39; || 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>
        [bum_code_value.currency 01] Unable to Analyse Expression emergingMkt == &#39;Y&#39; || 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.  If I change my LHS to:<br>
<br>
        BloombergColumn (columnName == &quot;CRNCY&quot;, $cur : stringValue != null)<br>
        Country (currency == $cur, emergingMkt == Character.valueOf(&#39;Y&#39;) || 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?  I don&#39;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><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>