< Previous | Next >

Task 7: Monitoring

In this task you learn how to monitor ruleset execution using Rule Execution Server Console. You also use Decision Warehouse to audit and view stored decision traces.

As an IT professional responsible for computer applications within your company, you must ensure that all rules-enabled applications are functioning correctly. In addition to providing an environment to manage the execution of your rules, Rule Execution Server lets you monitor the execution of your rulesets.

Auditors can analyze the execution performance of your rulesets, and troubleshoot any problematic transaction that may be reported. To identify the problem when a transaction fails, auditors and analysts need to know the business policies that were applied, and the transactional data that was used at execution time. Decision Warehouse is available from Rule Execution Server and stores ruleset execution traces that can be used for auditing purposes.

Time This task should take you about 10 to 15 minutes to complete.

Step 1: Run Rule Execution Server diagnostics

To help you identify errors with the execution environment, for example, network failures that make a database unavailable, Rule Execution Server provides diagnostic capabilities.

To run the Rule Execution Server diagnostics:

  1. Open the Rule Execution Server console.
    Tip:
    • Click Start > All Programs > IBM > package_group > Sample Server > Rule Execution Server Console. package_group refers to the package group specified in IBM® Installation Manager during installation. The default package group is Operational Decision Manager V8.5.
    • You can also enter http://localhost:<PORT>/res in a browser, with the correct port number.
  2. Sign in to Rule Execution Server using the following details:

    Username: resAdmin

    Password: resAdmin

  3. Click the Diagnostics tab, and then click Run Diagnostics.

    The green check marks indicate that rule execution was successful.

  4. Click Expand All to show the details of each test.

    The diagnostics test various aspects relating to the execution environment: connection, resource adapter information, creation of the RuleApp and ruleset, execution and update of the ruleset, and removal of the RuleApp and ruleset.

Step 2: View statistics on deployed RuleApps

When the execution environment is functioning correctly but performance problems are being reported, the Rule Execution Server console lets you obtain statistics on the execution of your rules.

To view statistics on deployed RuleApps:

  1. In Rule Execution Server, click the Explorer tab.
  2. Under Navigator, expand RuleApps and select the ruleset /myruleapp/1.0/myruleproject/1.0.
  3. Click View Statistics in the Ruleset View toolbar to see ruleset execution statistics such as how many times the ruleset has been executed, and runtime statistics such as Average Time and Maximum Time.
    Ruleset execution statistics
  4. In a separate browser window, open the Miniloan web application (http://localhost:<PORT>/miniloan-server).
  5. Make sure that the Use Rules check box is selected, and click Validate Loan.
  6. Switch back to the Rule Execution Server console and click Refresh.

    In the statistics, the count of rule executions has increased by the number of times you validated the loan.

Step 3: Execute a transaction in the Miniloan application

In the previous task, you added the monitoring.enabled ruleset property to keep a trace of the decision history. Every transaction you simulate for the ruleset is now stored and logged in Decision Warehouse.

To simulate a transaction in the Miniloan application:

  1. To start the Miniloan application, enter the following URL with the correct port number in a browser:

    http://localhost:<PORT>/miniloan-server

  2. Change the amount of the loan to 2000000.
  3. Make sure that the Use Rules check box is selected, and click Validate Loan.

    The loan is rejected.

Step 4: Search for past transactions in Decision Warehouse

You search for past transactions and decision traces in Decision Warehouse, to find the decision that led to the failed transaction.

To search for past transactions:

  1. In the Rule Execution Server console, click the Decision Warehouse tab.
  2. On the Search Decisions page, leave the fields blank, and click Search.

    Decision Warehouse displays the decisions for the transactions that you have executed in the Miniloan application. For example, the decision for the transaction executed in Step 3: Execute a transaction in the Miniloan application, shows the date and the processing time, and indicates that one rule was executed.

    Decision indicates that one rule was executed

Step 5: View the rules executed

You can use Decision Warehouse to understand why the loan has been rejected. You check the execution details for a decision and view the rules that were executed.

To view the execution details for a decision:

  1. In the table that lists the decisions found, in the Decision Trace column, click View Decision details for the decision where one rule was executed.

    The decision trace details open in a new window.

  2. In the Decision Trace section, expand Ruleflow Tasks > miniloan > miniloan > validation.

    The decision trace shows that the rule validation.maximum amount was executed.

    Decision Trace

    The loan was rejected because the amount entered in Step 3: Execute a transaction in the Miniloan application exceeds the maximum amount of 1000000.

  3. In the Input Parameters section, take a look at the input parameters listed.

    You can see that the input parameter for the amount of the loan is 2000000:

    <amount>
    <int>2000000</int>
    </amount>
  4. Close the decision trace window, and sign out of Rule Execution Server.

In the next task, you publish the rule project to Decision Center so that the business rules become accessible to the business user in a shared environment.

< Previous | Next >