25.5. Sudoku Example: Classes and Objects

  • An object belonging to the Setting class is used for triggering the operations that accompany the allocation of a value. The presence of a Setting fact is used in all rules that should detect changes in the process. This is to avoid reactions to inconsistent intermediary states.
  • An object of class Stepping is used in a low priority rule to execute an emergency halt when a "Step" ends unexpectedly. This indicates that the puzzle cannot be solved by the program.
  • The class org.drools.examples.sudoku.SudokuExample implements a Java application combining the above components.