Create a Rule Set and Define Business Rules

A business rule specifies conditions to be evaluated and actions to be taken if those conditions are satisfied. Rules are grouped together into rule sets. In this tutorial, you create a single rule set with three rules.
For more information, see Managing Rules and Rule Sets.
Create a New Rule Set
  1. Select Business Rulesthen selectRule Sets.
  2. Select your folder in the Tutorials folder.
  3. Click New and select New Rule Set. The New Rule Set window appears.
  4. Enter LoanScoreRules for the rule set name.
  5. Select HMEQ_Vocab for the vocabulary and click Create. SAS Business Rules Manager opens the rule set and displays the Properties page.
    Properties page for the LoanScoreRules rule set
Define Business Rules
To define the business rules for the new rule set, you enter condition and action expressions for the terms in the rule set into the rule set editor. The following steps define three simple rules that determine whether a loan application is a bad risk. The determination is based on the model score that was generated for the loan, among other things. For example, if the model score is less than or equal to 0.6, the loan is considered a bad risk, and the BadLoanFlag term is set to True.
  1. Select the Rules page.
  2. Expand the BadLoans_Test entity, and select the LANDLINE, MODELSCORE, and REASON terms.
  3. Right-click on one of the highlighted terms, and select Use as Condition Term.
  4. Right-click the BadLoanFlag term, and select Use as Action Term.
  5. Enter the rule expressions into the rule set editor. Each row in the table represents a different rule. Enter the expressions for each term into the column for that term. You can enter expressions directly into the table cells, or you can use the equation editor. Click equation editor to open the equation editor.
    Enter the expressions in the following table into the rule set editor.
    Rule
    Condition Terms
    Action Term
    LANDLINE
    MODELSCORE
    REASON
    BadLoanFlag
    Rule 1
    <=.6
    True
    Rule 2
    = 1
    >.6 AND <=.7
    ‘HomeImp’
    True
    Rule 3
    = 1
    >.7 AND <=.8
    ‘DebtCon’
    False
    Tip
    If you do not specify an operator at the beginning of an expression, SAS Business Rules Manager adds an equal sign to the beginning of the expression.
    Tip
    In condition expressions, when an AND or OR operator is followed immediately by another operator, SAS Business Rules Manager inserts the column term between the AND or OR operator and the operator that follows it.
    The following display shows the decision table with the rules that are defined for the LoanScoreRules rule set.
    decision table showing the rules defined in the LoanScoreRules rule set
Validate and Save the Rule Set
When you save a rule set, SAS Business Rules Manager validates the content of the rule set before saving it. However, you can validate the rule set at any time while you are creating the rule set.
  1. Click validate to validate the rule set.
  2. Click save to save the rule set.
  3. Click close to close the rule set.
Last updated: February 22, 2017