7.2 Rule

This topic describes about the Rule.

Rule enables the user to build the expression to perform the calculation with the facts created.

The type of rules supported are:
  • Logical: Example (ACCOUNT_BAL > 124432 ) && ( VALID_TILL < VALID_DATE)
  • Arithmetic: - Example: (CREDIT_BALANCE + TAX_CREDIT – INTEREST_AMOUNT)
  • Relational: - Example: (FACT5 == ACCOUNT && TAX >= 10)
  • Nested: - Example: ( RULE_ACCOUNT = TRUE ) && (ACCOUNT_BAL > 21234)
  • Multiple-If else: - Example: IF ( ACCOUNT_BAL > 124432 ) then OUTPUT1 ELSE IF ( ACCOUNT_BAL < 124432 ) then OUTPUT2
  • Multiple Nesting: - Example- INNERCHILDRULE : ( ACC_BAL > 30000 ) then OUTPUT = true
    • CHILDRULE : ( (INNERCHILDRULE == true) && (CBLSCORE > 5 ) ) then OUTPUT = true
    • PARENTRULE: ( (ACCTYPE == HOMELOAN ) && ( CHILDRULE == true ) )

Steps to build a Nested Rule expression is explained with the below example

The Rule Expression for Loan to Value (LTV) is Loan to Value (LTV) = (LOANAMOUNT /COLLATERAL_VALUE) *100

For now, the above expression is not supported directly, and LTV calculation is achieved by the below steps.
  1. Create a Rule1 - LOAN_TO_COLLATERAL

    Expression - LOANAMOUNT/COLLATERAL_VALUE

  2. Create a rule2 - Loan to Value (LTV)

    Expression - LOAN_TO_COLLATERAL *100

This topic contains the following subtopics: