Chapter 20. Salience State Example

20.1. Salience State Example: State Class Example

public class State {
    public static final int NOTRUN   = 0;
    public static final int FINISHED = 1;

    private final PropertyChangeSupport changes =
        new PropertyChangeSupport( this );

    private String name;
    private int    state;

    ... setters and getters go here...
}
  • Each State class has fields for its name and its current state (see the class org.drools.examples.state.State). The two possible states for each objects are NOTRUN and FINISHED.