example of rule that doesn't work without eval:

/*    rule "1"
    salience -1
    agenda-group "agenda1"
    when
        $conclusion: supportFT()
    then
                if($conclusion.getValue()==null){
                        modify($conclusion) { setValue(new ArrayList())};
                }
                $conclusion.getValue().add("supportedValue");
                modify($conclusion) { setValue($conclusion.getValue()) };
     end


    rule "2"
    salience -2
    agenda-group "agenda2"
    when
        supportFT(Operators.containsAny(value,new
String[]{"supportedValue","otherValue"}))  
                $conclusion: ConclusionFt()
    then
                modify($conclusion){setValue("success")};
    end*/

rule "2" doesn't hit, works only with eval in rule "2".
in this example I can add eval, because the Fact Types model is different,
so the rule doesn't reevaluated.
because I had this case, I decided to add eval for all constraints, but
unfortunately I had an infinite loop. 




--
View this message in context: 
http://drools.46999.n3.nabble.com/Adding-eval-on-rule-cause-it-to-run-in-infinite-loop-tp4029966p4029984.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to