This is my code:

                 session.getAgenda().getAgendaGroup("add").setFocus();
                 try {
                        int rule=session.fireAllRules();
                        System.out.println(rule+" rules fired");
                } catch (Exception e) {
                        e.printStackTrace();
                }

The rule doesn't print the message and the code print "0 rules fired". I am
using drools 5.1.1. Is this the version you are using?

My rule file is:

rule "add2"
        agenda-group "add"
        dialect "java" 
        lock-on-active
        when 
                eval(true)
        then 
                System.out.println("add2");
end

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-let-a-rule-run-only-one-time-tp3550555p3567777.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to