Show Table of Contents
20.5. Salience State Example: Rule "Bootstrap"
rule Bootstrap
when
a : State(name == "A", state == State.NOTRUN )
then
System.out.println(a.getName() + " finished" );
a.setState( State.FINISHED );
end
Result:
rule "A to B"
when
State(name == "A", state == State.FINISHED )
b : State(name == "B", state == State.NOTRUN )
then
System.out.println(b.getName() + " finished" );
b.setState( State.FINISHED );
end
- Every action and the corresponding changes appear in the Working Memory.
- The assertion of the State object A in the state
NOTRUNactivates theBootstraprule, while the assertions of the otherStateobjects have no immediate effect. - The execution of rule Bootstrap changes the state of A to
FINISHED, which, in turn, activates rule "A to B".

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.