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.
  1. Select the Rules page.
  2. Expand the BadLoans_Test entity, and select the HAS_LANDLINE, LOAN_SCORE, 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
    HAS_LANDLINE
    LOAN_SCORE
    REASON
    BadLoanFlag
    Rule 1
    >.5
    True
    Rule 2
    = True
    >.6 AND <=.8
    ‘HomeImp’
    True
    Rule 3
    = True
    >.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.
Lock and Close the Rule Set
The last major step in creating a rules database is to create and publish rule flows. However, you cannot publish rule flows unless the rule set versions that are used in the rule flows are locked.
  1. Select the Versions page.
  2. Select Version 1.1 of the rule set, and click lock to lock the selected version.
    Versions page showing “Version 1.1 (Locked)”
  3. Click close to close the rule set.