Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-7617

Agenda order documentation backwards?

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Trivial Trivial
    • None
    • 8.44.0.Final
    • docs
    • None
    • Documentation (Ref Guide, User Guide, etc.)
    • NEW
    • NEW
    • ---
    • ---

      I believe the text of the "agenda groups for rules" does not match the example on the order of execution of the agenda groups. 

      https://docs.drools.org/8.44.0.Final/drools-docs/drools/rule-engine/index.html#_agenda_groups_for_rules

      existing text with comments inline in blue.

      "
      For this example, the rules in the "report" (should be "calculation") agenda group must always be executed first and the rules in the "calculation" (should be "report") agenda group must always be executed second. Any remaining rules in other agenda groups can then be executed. Therefore, the "report" and "calculation" groups must receive the focus to be executed in that (that -> reverse) order (add? due to the agenda stack), before other rules can be executed:
      Set the focus for the order of agenda group execution
       {{Agenda agenda = ksession.getAgenda();
      agenda.getAgendaGroup( "report" ).setFocus();
      agenda.getAgendaGroup( "calculation" ).setFocus();
      ksession.fireAllRules();"}}
      {{}}
      {{}}

              mfusco@redhat.com Mario Fusco
              jareddavis Jared Davis (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: