<br> Bryan,<br><br> This is a bug. May I ask you please to open a JIRA for it. I will fix and include it into the 4.0.2 release.<br><br> Thanks,<br> Edson<br><br><div><span class="gmail_quote">2007/9/19, wasabifan <
<a href="mailto:bryan.rickman@kewill.com">bryan.rickman@kewill.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Sure. Here is one example (though I think it may have an
<br>existential/universal not error as mentioned in another post):<br><br>rule "6040 Pass CA Fees"<br> when<br> #conditions<br> $status : ValidationPassFailStatus()<br> exists ValidationControl(validationNo == 6040)
<br> CiLines($ciNo : ciNo, $ciLineNo : ciLineNo, $countryOrigin :<br>countryOrigin)<br> Country(country == $countryOrigin, canadianProvince != "",<br>canadianProvince != "N")
<br> (CiLineFees(amtFee == 0, ciNo == $ciNo, ciLineNo == $ciLineNo)<br> or not CiLineFees(ciNo == $ciNo, ciLineNo == $ciLineNo))<br> then<br> #actions<br>
System.out.println("6040 Pass CA Fees");<br> $status.passSq(6040);<br>end<br><br>I have tried this with and without the parenthesis for explicitness. It<br>errors out when inserting facts for the rule:
<br><br>java.lang.ClassCastException:<br>com.kewill.icustoms.customs.rules.model.ValidationPassFailStatusShadowProxy<br> at<br>org.drools.base.com.kewill.icustoms.dbi.model.CiLines$getCountryOrigin.getValue(Unknown
<br>Source)<br> at<br>org.drools.base.extractors.BaseObjectClassFieldExtractor.getHashCode(BaseObjectClassFieldExtractor.java:139)<br> at<br>org.drools.base.ClassFieldExtractor.getHashCode(ClassFieldExtractor.java
:173)<br> at org.drools.rule.Declaration.getHashCode(Declaration.java:272)<br> at<br>org.drools.util.AbstractHashTable$SingleIndex.hashCodeOf(AbstractHashTable.java:489)<br> at<br>org.drools.util.TupleIndexHashTable.getOrCreate
(TupleIndexHashTable.java:280)<br> at org.drools.util.TupleIndexHashTable.add(TupleIndexHashTable.java:192)<br> at org.drools.reteoo.JoinNode.assertTuple(JoinNode.java:111)<br> ...<br><br>However, if I break this into two separate rules, it behaves as expected
<br>(with the possible existensial/universal logic problem I mention above).<br><br>rule "6040 Pass CA Fees"<br> when<br> #conditions<br> $status : ValidationPassFailStatus()
<br> exists ValidationControl(validationNo == 6040)<br> CiLines($ciNo : ciNo, $ciLineNo : ciLineNo, $countryOrigin :<br>countryOrigin)<br> Country(country == $countryOrigin, canadianProvince != "",
<br>canadianProvince != "N")<br> CiLineFees(amtFee == 0, ciNo == $ciNo, ciLineNo == $ciLineNo)<br> then<br> #actions<br> System.out.println("6040 Pass CA Fees");
<br> $status.passSq(6040);<br>end<br><br>rule "6040 Pass CA No Fees"<br> when<br> #conditions<br> $status : ValidationPassFailStatus()<br> exists ValidationControl(validationNo == 6040)
<br> CiLines($ciNo : ciNo, $ciLineNo : ciLineNo, $countryOrigin :<br>countryOrigin)<br> Country(country == $countryOrigin, canadianProvince != "",<br>canadianProvince != "N")
<br> not CiLineFees(ciNo == $ciNo, ciLineNo == $ciLineNo)<br> then<br> #actions<br> System.out.println("6040 Pass CA No Fees");<br> $status.passSq(6040);
<br>end<br><br><br><br>Edson Tirelli-3 wrote:<br>><br>><br>> As we speak, there is no known problem in the use of this functionality<br>> in 4.0.1.<br>><br>> Can you please provide an example of the problems you are finding?
<br>><br>> Thanks,<br>> Edson<br>><br>><br>><br><br>--<br>View this message in context: <a href="http://www.nabble.com/Arbitrary-problem-using-OR--tf4481210.html#a12779845">http://www.nabble.com/Arbitrary-problem-using-OR--tf4481210.html#a12779845
</a><br>Sent from the drools - user mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br><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> Edson Tirelli
<br> Software Engineer - JBoss Rules Core Developer<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>