25.2. Sudoku Example: Debugging a Broken Example

Procedure 25.2. Task

  1. Open sudoku.drl in your IDE.
  2. Click on FileSamples!DELIBERATLEY BROKEN!. The JBoss Rules engine will inspect the grid and produce the following output:
    cell [0,8]: 5 has a duplicate in row 0
    cell [0,0]: 5 has a duplicate in row 0
    cell [6,0]: 8 has a duplicate in col 0
    cell [4,0]: 8 has a duplicate in col 0
    Validation complete.
    
  3. Click on the Solve button to apply the solving rules to this invalid grid. These rules use the values of the cells for problem solving. The rules detecting these situations insert a Setting fact including the solution value for the specified cell. This fact removes the incorrect value from all cells in the group.