< Previous | Next >

Task 2-3: Importing and exploring the rules

In this task, you import the remaining rules and explore them to understand their purpose and to learn how the agent uses them.

Procedure

  1. Import the remaining rules:
    1. Click File > Import.
    2. In the Select page of the Import wizard, expand General, click File System, and click Next.
    3. In the From directory field, click Browse.
    4. Navigate to the <InstallDir>/gettingstarted/answer/CreditCardRules/rules/my_rules folder, and click OK.
    5. Select the four remaining rules. Do not select the Transaction Out Of Country rule, because that is the rule you created in the previous step.
    6. In the Into folder field, click Browse, select the CreditCardRules/rules/my_rules folder, and click OK.
      Selecting the remaining rules to be imported
    7. Click Finish.
    The rule agent is now populated with all five rules.
  2. In the solution explorer, select and expand the my_rules package.
    The rules are in the my_rules package
  3. Open each of the rules to review their syntax and purpose:
    • The Check Risky And Below Average rule emits an Authorization response event if the balance of the account is more risky than the average balance that was last checked.
    • The Too Many In One Day rule emits an Authorization response event if more than three transactions occur in the last day and if the total amount and the average transaction amount are more than a specified amount. The Average Transaction Amount Per Day is a global aggregate variable.
    • The Transaction Too Large rule emits an Authorization response event when a Transaction occurs with an amount above a specified amount.
    • The Update Account rule changes the balance of the account after a transaction.
  4. Close the rules.
< Previous | Next >