Task 2: Changing the preconditions and the rules

In this task, you update the preconditions for the decision table, and change the cell values of conditions and actions.

About this task

You add a precondition that tests the borrower's age, and then you add values to the new rows in the decision table.

Step 1: Changing the preconditions

In this step, you add a test to check that the borrower is at least 18 years old.

Before you begin

You use preconditions to test incoming data. The rules in a decision table cannot process data that fails the preconditions. Currently, the table only has one precondition, which tests data for a grade value:
if
	'the grade' is not empty

Procedure

  1. Click the Preconditions button.
  2. Use the rule editor to add the following statement to the preconditions:
    and the age of 'the borrower' is at least 18 
  3. Click OK to save your changes, and close the dialog box.

    The preconditions now contain the following statement:

    if
    	'the grade' is not empty
     	and the age of 'the borrower' is at least 18
    The decision table processes a loan request if the data includes a loan grade, and the borrower is at least 18 years old. The preconditions test the data before each rule in the table is run.

Step 2: Changing the grade cells in the new rows

In this step, you update the rows for the new grade to complete the rules. You start by changing one value and copying it to several cells.

Procedure

  1. Click the Grade cell in row 13.
  2. Double-click the cell, replace the existing value with D, and then press Enter.
  3. Right-click the cell, and click Copy.
  4. Select the Grade cells of rows 14 to 16.
  5. Right-click the selected cells, and click Paste to change their values from C to D.

Step 3: Adding values to the condition columns

In this step, you add values to the condition columns.

Procedure

  1. Double-click the Age cell in row 1.
    The Min cell opens. Type 30 as the minimum value.
  2. Click the other subcell (Max).
    Type 65 as the maximum value.
  3. Repeat steps 1 and 2 to add 25 and 29, 21 and 24, and 18 and 20 to the Age cells of rows 5, 9, and 13, respectively.
  4. Right-click the Age cell in row 1, and click Copy.
  5. Select the Age cells of rows 2 to 4.
  6. Right-click the selected cells, and click Paste.
  7. Repeat steps 4 - 6 with the Age cells in grades B, C®, and D.
  8. Steps 8-9 add errors that you fix in the next task. Change the Amount of loan cells for rows 13 and 14 to the following values:
    • Row 13: 100,00A
    • Row 14: Max: 200,000
  9. Right-click the Amount of loan cell in row 13, and click Change operator > >. The operator no longer includes values that are less than 100,000.
  10. Right-click the Amount of loan cell in row 16, and click Change operator > "". The operator includes values less than and equal to 600,000.
  11. Press the Optimize Row Order button "".
    The action cells for grade D now show an error in red, and triangles that open error messages.

Step 4: Completing the action columns

In this step, you enter values in the action columns.

Procedure

  1. Click the Insurance rate cell for row 13, and change the value to 0.006.
  2. Repeat step 1 for the rest of the grade D Insurance rate cells:
    • Row 14: 0.006
    • Row 15: 0.008
    • Row 16: 0.008

What to do next

In the next task, you use content checking to solve problems in the decision table.