< Previous | Next >

Defining dynamic rules

In our scenario, we want to approve the loan if the loan amount is less than $50 000. In addition, we want to allow changes to the loan amount threshold after the rules have been deployed to the runtime environment.

To do that, we need to first define a rule template, which we will then extend a rule instance from, by completing the following steps:
  1. Click the Add If-Then Template icon under Templates, and call the new template AutoLoanApproval.
  2. Add a parameter named LoanValue of type int.
  3. In the Presentation field, type a statement that the administrator will use to configure the LoanValue at run time. In this case, the AutoLoanApproval rule will return true if the LoanAmount is less than or equal to LoanValue, so type Approved if loan amount is <=.
  4. Click in the Presentation field and select LoanValue from the list.
  5. To check if the loan amount is less than the threshold, click Condition expand AutoApprovalInput and select LoanAmount. Select the less than or equal to symbol, <=, then select LoanValue.
  6. To set the response, click Action and select AutoApprovalResponse. Select the equals sign, =, then select true.
  7. Press enter and type return. The rule template should look like the one in the following screen capture:
    Completed rule template
  8. Under the Rules section, select Add Template Rule and then select the newly created rule template, AutoLoanApproval.
  9. In the input box type 50000.
    Set the Loan amount
  10. To ensure "false" is returned when the LoanAmount is higher than the amount that is specified in the LoanValue rule, add an Action rule and configure it as shown in the following screen capture:
    AutoApprovalResponse is false
  11. The rule set editor, with all the rules configured is shown in the following image:
    Rule Set editor with completed rules
  12. Save and close the Business Rules and Rule Group editors.

Feedback

(C) Copyright IBM Corporation 2005, 2008. All Rights Reserved.

< Previous | Next >