Hello,<br>I have a class and rule:<br><br>class CTestObj<br>{<br>        private double value;<br><br>        void setValue(double v) {<br>                this.value = v;<br>        }<br><br>        double getValue() {<br>
                return this.value;<br>        }<br>}<br><br>rule &quot;r1&quot;<br>    when<br>        p : CTestObj<br>    then<br>        p.setValue( 1 / p.getValue() );<br>end<br><br>As you can see, in this rule, there is risk, to put into stateFulSession object with value set 0. I can&#39;t validate this, because, this problem has a variation where I put into stateFulSession object with set no 0, but the rule will modify it...<br>
So - I can&#39;t validate this = fact with value 0 is correct.<br><br>But I process with stateFulSession many, many facts... For example 1000. And, after 900 facts it occurs, that fact number 901 has value set on 0. In effect I get an exception:  org.drools.runtime.rule.ConsequenceException: java.lang.ArithmeticException: / by zero. And ksession stops processing facts. But, 900 facts are processed! I don&#39;t want to process them second time.<br>
And this is my question:<br><br>How can I know, which fact is first no-processed fact? Which one stoped fireAllRules method?<br>Beacuse I don&#39;t want to process them another time.<br><br>Greetings :)<br>tom.<br><br><br>
<br><br>