[rules-users] function in drools

thano asimoon at gmail.com
Thu Sep 27 15:07:52 EDT 2012


Thanks for for the clarification.

I am thinking to use agenda group instead. At least it would let me activate
Rule 2 from Rule 1 without passing any parameters. However, I am struggling
to understand the following example. Would it end after printing person name
in rule HelloMr or get in a loop, Because, agenda group work on stacking the
rules.

thanks
--------------------------------
rule "MrFlow"
     when
          person : Person ( gender == 'M');
     then
          System.out.println("Mr flow activated");
          drools.setFocus("MrGroup");
end
 

 
rule "HelloMr"
     agenda-group "MrGroup"
     when
          person : Person ();
     then
          System.out.println("Hello Mr. " + person.getName());
          retract (person);
end



--
View this message in context: http://drools.46999.n3.nabble.com/function-in-drools-tp4020021p4020028.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list