Task 1: Editing a decision table

In this task, you add rows and columns to a decision table.

About this task

You edit the insurance decision table in the Loan Validation Service decision service. The decision table determines whether borrowers must pay insurance on their loans. When a borrower must pay insurance, the table determines how much insurance as a percentage of the loan.
Important: To work on the provided sample server, see Starting and stopping the sample server.

Step 1: Opening the decision table

In this step, you open the insurance decision table in the decision table editor.

Procedure

  1. Start the Business console by using the URL that is provided by your system administrator. If you are using the sample server on your computer, see Opening Decision Center on the sample server.
  2. Log in to the console by using Bea as the user name and password.
  3. Open the Library tab and the Loan Validation Service decision service.
  4. Open Branches > main > Decision Artifacts > Loan Validation Determination.
    Note: Normally, the best practice is to copy the main branch and work in the copy to avoid modifying the original branch.
  5. Open the insurance folder by clicking on it, and select the insurance decision table.
  6. Click the Edit button "" to open the table in the decision table editor. Keep the default settings and click OK.

Step 2: Adding and defining a column

In this step, you add and define a condition column.

Before you begin

A decision table groups rules that have the same rule statement but different values for conditions and actions. The insurance decision table uses the following rule statement:
if 
	'the grade' is <a string>
	and the amount of 'the loan' is at least <min> and less than <max>
then
	set insurance required in 'the loan report' to <a boolean>
	set the insurance rate in 'the loan report' to <a number>
Each column in the decision table forms part of the rule statement. The Grade and Amount of loan columns form the conditional part of the rule (if), and the Insurance required and Insurance rate columns form the action part of the rule (then). Each row forms a business rule by providing the values to complete the rule statement that is defined by the columns.

Follow these steps to add a column and define it.

Procedure

  1. Right-click the header of the Amount of loan column.
  2. Click Insert column > Condition after to insert a blank column next to the selected column.
  3. Click the header of the new column, and change the name to Age.
  4. Right-click the header and click Define column.
  5. In the Define Condition Column dialog, enter the following statement. You can copy the sample code and paste it into the editor.
    the age of 'the borrower' is between <min> and <max> 
  6. Click OK to save the condition statement.
    The editor adds min and max cells to the column header. These cells correspond to the minimum and maximum values in the condition statement.
  7. Click min and change it to Min. Do the same to max to change it to Max.
    Changing the cell names does not change the condition statement.
    By adding the Age column to the decision table, you changed the rule for the table to the following statement:
    if 
    	'the grade' is <a string>
    	and the amount of 'the loan' is at least <min> and less than <max>
    	and the age of 'the borrower' is between <min> and <max>
    then
    	set insurance required in 'the loan report' to <a boolean>
    	set the insurance rate in 'the loan report' to <a number>
    

Step 3: Adding rows to the table

In this step, you add a group of rows to the table. Each row represents a complete rule.

Procedure

  1. Click cell 9 to select its row.
  2. Press Shift and click cell 11 to select rows 9 - 11.
    Note: Ctrl + click has the same behavior as Shift + click.
  3. Right-click the selected rows, and click Copy.
  4. Right-click cell 13 and click Insert copied rows.

Step 4: Adding a single row

In this step, you add a single row to the decision table.

Procedure

  1. Right-click cell 12, and click Copy.
  2. Right-click cell 16, and click Insert copied rows.
    The contents of row 12 are copied to row 16.
  3. Click the Save button to save your changes.

What to do next

In the next task, you change the preconditions and the rules for the decision table.