<br>   My suggestion is that you try Drools 5.0.1 with MVEL 2.0.10. If you need to stay on Drools 4, then try replacing the mvel jar by MVEL 1.3.9.<br><br>   []s<br>   Edson<br><br><div class="gmail_quote">2009/6/15 VinuJay <span dir="ltr">&lt;<a href="mailto:vinod.jayendra@wipro.com">vinod.jayendra@wipro.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hi Edson,<br>
<br>
Thanks for the reply.<br>
<br>
I am using Drools 4.0.7 and mvel 1.3.1-java1.4.jar<br>
<div><div></div><div class="h5"><br>
<br>
Edson Tirelli-3 wrote:<br>
&gt;<br>
&gt;    What versions of Drools and MVEL are you using?<br>
&gt;<br>
&gt;    []s<br>
&gt;    Edson<br>
&gt;<br>
&gt; 2009/6/15 VinuJay &lt;<a href="mailto:vinod.jayendra@wipro.com">vinod.jayendra@wipro.com</a>&gt;<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hi my fact object looks like this,<br>
&gt;&gt;<br>
&gt;&gt; class ProcessRequest {<br>
&gt;&gt;<br>
&gt;&gt;  Long requestId;<br>
&gt;&gt;<br>
&gt;&gt;  String processType;<br>
&gt;&gt;<br>
&gt;&gt;  String assigneeUsers;<br>
&gt;&gt;<br>
&gt;&gt;  HashTable&lt;String,Object&gt; businessData;<br>
&gt;&gt;<br>
&gt;&gt;  //Getters and Setters<br>
&gt;&gt;<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; My businessdata can be of type Integer, String, Boolean, hence i have<br>
&gt;&gt; used<br>
&gt;&gt; generic Object for the business data value.<br>
&gt;&gt;<br>
&gt;&gt; But if i use any mathematical operator in the rules (.drl) file like,<br>
&gt;&gt; rule &quot;Assign&quot;<br>
&gt;&gt; when<br>
&gt;&gt; p: ProcessRequest(processType == &quot;LoanFlowPlus&quot; &amp;&amp;<br>
&gt;&gt; businessData[&#39;LOANAMOUNT&#39;] &lt; 5000)<br>
&gt;&gt; then<br>
&gt;&gt;        p.setAssigneeUsers(&quot;jcooper&quot;);<br>
&gt;&gt; end<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; i get an error<br>
&gt;&gt; Exception in thread &quot;main&quot; org.drools.RuntimeDroolsException: Exception<br>
&gt;&gt; executing predicate eval( businessData[&#39;LOANAMOUNT&#39;] &lt; 5000 )<br>
&gt;&gt; Caused by: java.lang.ClassCastException: java.lang.Integer<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Shouldn&#39;t the drools API handle this class cast conversion internally ..?<br>
&gt;&gt; or<br>
&gt;&gt; how to specify the class casting in rules file<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; View this message in context:<br>
&gt;&gt; <a href="http://www.nabble.com/Class-Casting-in-a-Collection-data-tp24031803p24031803.html" target="_blank">http://www.nabble.com/Class-Casting-in-a-Collection-data-tp24031803p24031803.html</a><br>
&gt;&gt; Sent from the drools - user mailing list archive at Nabble.com.<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; rules-users mailing list<br>
&gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt;  Edson Tirelli<br>
&gt;  JBoss Drools Core Development<br>
&gt;  JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
&gt;<br>
<br>
--<br>
</div></div>View this message in context: <a href="http://www.nabble.com/Class-Casting-in-a-Collection-data-tp24031803p24046788.html" target="_blank">http://www.nabble.com/Class-Casting-in-a-Collection-data-tp24031803p24046788.html</a><br>

<div><div></div><div class="h5">Sent from the drools - user mailing list archive at Nabble.com.<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"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>