20.12. Salience State Example: Agenda Group Rules "D to E"

rule "D to E"
  when
      State(name == "D", state == State.FINISHED )      
      e : State(name == "E", state == State.NOTRUN )
  then
      System.out.println(e.getName() + " finished" );
      e.setState( State.FINISHED );
end
This produces the following expected output:
A finished
B finished
C finished
D finished
E finished
  • StateExampleWithDynamicRules adds another rule to the Rule Base after fireAllRules().