<br>&nbsp;&nbsp;&nbsp; This seems a bug. May I ask you please to open a JIRA for it and attach a self contained test showing the problem?<br><br>&nbsp;&nbsp;&nbsp; At the same time, I think there is a conceptual error in your rules: no object should be changed in the LHS of the rules. This will surely cause you problems in the future, so, I strongly advise you to rethink your rules.
<br><br>&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/9/18, Gaurav2007 &lt;<a href="mailto:gaurav.a.joshi@capgemini.com">gaurav.a.joshi@capgemini.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Hi All,<br><br>I am using drool 4.0.1,I am facing some problem in using or operator<br><br> i am using 2 maps by inserting in to working memory:<br>1) ErrorMap&lt;&quot;String&quot;,&quot;String&quot;&gt;<br>2) validationmap&lt;String,Object&gt;
<br><br>my requirment is to generate error when rule fails for this i am taking<br>following steps:<br>1) i insert one entry in error map in when part and if that rule is success<br>2)i remove that entry from map and<br>3) at the end on the basis of this map i generates validation errors.
<br><br><br>import java.util.Map;<br>import com.IValidationField;<br><br>rule &quot;ValueAllowed_G10.3&quot;<br>when<br>IValidationField(attributeId ==&quot;G10.3&quot;)<br>$map : Map( keySet contains &quot;ErrorMap&quot; )
<br>eval($map.put(&quot;G10.3_V&quot;,&quot;E_V_ALLOWED&quot;) == null || true)<br>(or Map( this[&quot;G10.2&quot;] not in(&quot;5&quot;))<br>Map( this[&quot;G10.2&quot;] in(&quot;5&quot;)))<br>then<br>map.remove(&quot;G10.3_V
&quot;);<br>System.out.println(&quot;comming<br>here-----------------------------------------&gt;&quot;);<br>end<br><br>this file is giving classcast exception<br><br>org.drools.RuntimeDroolsException: java.lang.ClassCastException
:<br>com.ValidationFieldImpl<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:75)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at<br>org.drools.reteoo.EvalConditionNode.assertTuple(EvalConditionNode.java:141)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at<br>org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple
(SingleTupleSinkAdapter.java:20)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.drools.reteoo.JoinNode.assertTuple(JoinNode.java:120)<br><br>but when i replace &quot;or&quot; with &quot;and&quot; operator then it is working fine:<br>import java.util.Map
;<br>import com.IValidationField;<br><br>rule &quot;ValueAllowed_G10.3&quot;<br>when<br>IValidationField(attributeId ==&quot;G10.3&quot;)<br>$map : Map( keySet contains &quot;ErrorMap&quot; )<br>eval($map.put(&quot;G10.3_V
&quot;,&quot;E_V_ALLOWED&quot;) == null || true)<br>(and Map( this[&quot;G10.2&quot;] not in(&quot;5&quot;))<br>Map( this[&quot;G10.2&quot;] in(&quot;5&quot;)))<br>then<br>map.remove(&quot;G10.3_V&quot;);<br>System.out.println
(&quot;comming<br>here-----------------------------------------&gt;&quot;);<br>end<br><br><br>--<br>View this message in context: <a href="http://www.nabble.com/Problem-in-using-or-operator-with-values-in-map.-tf4472442.html#a12752031">
http://www.nabble.com/Problem-in-using-or-operator-with-values-in-map.-tf4472442.html#a12752031</a><br>Sent from the drools - user mailing list archive at <a href="http://Nabble.com">Nabble.com</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">https://lists.jboss.org/mailman/listinfo/rules-users
</a><br></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ 
<a href="http://www.jboss.com">www.jboss.com</a>