<br>   What versions of Drools and MVEL are you using? <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 my fact object looks like this,<br>
<br>
class ProcessRequest {<br>
<br>
  Long requestId;<br>
<br>
  String processType;<br>
<br>
  String assigneeUsers;<br>
<br>
  HashTable&lt;String,Object&gt; businessData;<br>
<br>
  //Getters and Setters<br>
<br>
}<br>
<br>
My businessdata can be of type Integer, String, Boolean, hence i have used<br>
generic Object for the business data value.<br>
<br>
But if i use any mathematical operator in the rules (.drl) file like,<br>
rule &quot;Assign&quot;<br>
when<br>
p: ProcessRequest(processType == &quot;LoanFlowPlus&quot; &amp;&amp;<br>
businessData[&#39;LOANAMOUNT&#39;] &lt; 5000)<br>
then<br>
        p.setAssigneeUsers(&quot;jcooper&quot;);<br>
end<br>
<br>
<br>
i get an error<br>
Exception in thread &quot;main&quot; org.drools.RuntimeDroolsException: Exception<br>
executing predicate eval( businessData[&#39;LOANAMOUNT&#39;] &lt; 5000 )<br>
Caused by: java.lang.ClassCastException: java.lang.Integer<br>
<br>
<br>
Shouldn&#39;t the drools API handle this class cast conversion internally ..? or<br>
how to specify the class casting in rules file<br>
<font color="#888888"><br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <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>

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>
</font></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>