21 Monitoring Decision Service Service Components and Engine

This chapter describes how to monitor Decision Service service components, including service engine performance statistics and deployed composites; business rule tracing; and log files. Decision Service service components are also called business rules service components in the Oracle Fusion Middleware documentation.

This chapter includes the following topics:

For information about business rules tuning and performance parameters, see Tuning Performance.

Note:

The business rules service engine does not support any user level configuration.

21.1 Monitoring Business Rules Service Engine Performance Statistics

Using the business rules service engine Statistics page, you can monitor business rules service engine performance and metrics. This page shows service engine-level, not component-level, details. Business rules service components are also called Decision Service service components in the Oracle Fusion Middleware documentation.

To monitor business rules service engine statistics:

  1. Access the business rules service engine statistics page through one of the following options:

    From the SOA Infrastructure Menu... From the SOA Folder in the Navigator...

    Select Service Engines > Business Rules.

    1. Select soa-infra.

    2. Right-click and select Service Engines > Business Rules.

  2. Click Statistics.

    The Statistics page displays the following:

    • Average Request Processing Time: This chart displays the average request processing time of the business rules service engine since server startup. That is, how many requests were processed by the service engine per unit of time.

    • Business Rules Cache Statistics: This section provides details about the service engine cache. This section lists the types of caches used by the service engine and the object count in each of the caches. All these metrics are based on the object count since server startup.

    • Business Rules Operation Statistics: This section shows the operation statistics. Using the operation statistics, you can determine the number of calls to Oracle Business Rules decision functions since server startup, and determine the total time spent in Decision Functions since server startup.

      Note:

      When you view business rules operation statistics for composite applications created with Oracle Fusion Middleware 11g Release 1 (11.1.1), the only operation shown is the callFunction operation. In this release, the Decision Service service only calls Oracle Business Rules using decision functions, and this operation is indicated with values for the operation named callFunction (with Count and Average(ms) fields). With composite applications that were migrated from older releases, the Decision Service service performs callFunction operations and the other operations listed in the Business Rules Operation Statistics section. For these migrated projects, you can debug the flow of the request through various important operations within the service engine. Also, you can find any long-running operations and take the necessary actions. These metrics also are since server startup.

    For information about business rules tuning and performance parameters, see Tuning Performance.

21.2 Monitoring Business Rules Service Engine Deployed Components

Using the Deployed Components page, you can monitor all Decision Service service components deployed across SOA composite applications. Decision Service service components are also called business rules components in the Oracle Fusion Middleware documentation.

To monitor business rule service engine deployed components:

  1. Access the business rules service engine Deployed Components page through one of the following options:

    From the SOA Infrastructure Menu... From the SOA Folder in the Navigator...

    Select Service Engines > Business Rules.

    1. Right-click soa-infra.

    2. Select Service Engines > Business Rules.

  2. Click Deployed Components.

    The Deployed Components page displays the following:

    • A utility for searching for a specific component by specifying criteria and clicking Search.

    • A list of components, including the name, the SOA composite application name, and the status (up or down).

  3. In the Name column, click a name to navigate to the Component home page and view component details.

  4. In the Composite column, click a specific SOA composite application to access its home page.

For more information, see Introduction to Service Components.

21.3 Monitoring Business Rule Tracing

You can use Oracle Enterprise Manager Fusion Middleware Control to perform rule execution tracing. For more information about accessing and using Fusion Middleware Control, see Getting Started with Administering and Oracle BPM Suite.

A rule execution trace is a mechanism of tracing business rules service engine events that occur during the evaluation of rules. The types of events traced are:

  • Fact operations (assert, retract, and modify)

  • Rules execution

  • Rule activation

  • Ruleset stack changes

  • Rule compilation

  • Reset (required for maintaining state during analysis)

Each trace contains information about the event that it traces. For example, a rule trace entry for an executed rule consists of:

  • Rule name (RL name)

  • Execution sequence number

  • List of fact IDs for the facts that matched this rule

  • Timestamp in milliseconds

Rule execution trace audit levels are the same as the audit levels supported in the SOA Infrastructure:

  • Off: Rule execution tracing is disabled. The decision component instance is not created at all.

  • Development: Full rule execution tracing that contains all the details about facts (listing, operations such as modify and assert), rule activation, pop or push rulesets, and so on. It also provides a list of fact IDs on which the executed rules are matched. See Tracing Rule Execution at the Development Audit Level for an example.

  • Production: The executed rules are traced. All the details about facts, rule activation, pop or push ruleset are not available. The trace do not contain a list of the matching facts IDs. See Tracing Rule Execution at the Production Audit Level for an example.

You can set audit levels either at the SOA Infrastructure level or at the composite level. See Configuring SOA Infrastructure Properties for SOA Infrastructure audit level configuration information. See Introduction to the Order of Precedence for Audit Level Settings for a discussion about audit level precedence when set at the SOA Infrastructure level and the composite level.

The following sections discuss setting audit levels at the composite level for the purposes of rule execution tracing.

21.3.1 Tracing Rule Execution at the Development Audit Level

By setting the audit level to Development you can view all the details pertaining to a rule that has been executed.

To perform a development-level rule execution trace:

  1. Open the composite application in Oracle Enterprise Manager Fusion Middleware Control.

    A list of the recent business flow instances is shown on the composite Dashboard page.

  2. Click the Settings list, select Composite Audit Level, > Development to set the trace level as Development at the composite level.
  3. Click Yes in the Confirmation dialog.
  4. Click Test and then click the name of the service to invoke a test instance of the business flow to view the decision traces corresponding to different input parameters.
  5. Enter a value in the Value field in the Input Arguments section on the Test Web Service page and click the Test Web Service button.

    Use the Load Payload field to add a payload file. Click Browse to locate the file and then click Save Payload to save the file.

    Based on the input Order ID, the service invokes a BPEL process instance containing the details of the Order ID, and the rule that is relevant to the order details is executed.

  6. Click Launch Flow Trace under the Response tab to open the Flow Trace page.
  7. Click the Decision Service service component instance called RatingRules in the Trace section to view the actual rule execution trace.

    Note:

    You can also view the values of composite variables before and after invocation of business rule component. You must click the BPEL process component instance in the Flow Trace page, and then click the relevant payload. In this case, the BPEL component name is WlsRulesFaultProcess.

    The execution trace for the Decision Service service component called RatingRules is shown.

  8. Select the Show rule set stack states in audit trail check box to view further details of the rule execution.

    Selecting this check box affects just the trace (the Rule Set Stack panel on the right hand side is not impacted). This check box hides or shows the pushed or popped steps. The default option is Hidden, which displays a more compact rendition of the audit trail.

    The development-level trace report displays the fact name, activated rule, and the pushed and popped ruleset names.

    The following table lists the entries of the trace report:

    Element Description

    Invoked Decision Service Name

    Displays the name of the Decision Service service component that is invoked.

    Asserted Fact

    There can be three types of asserted facts:

    • Input fact

    • Facts that get asserted as part of initial actions of a decision function

    • Facts that get asserted during rule execution

    Activated Rule

    Displays the name of the rule that is activated, along with the name of the fact that activated the rule.

    Pushed ruleset

    Displays the name of the ruleset that has been invoked when the fact is asserted.

    Fired rules in Ruleset

    Displays the name of the ruleset whose rule is executed.

    Fired rule

    Displays the name of the rule that is executed.

    Modified fact

    Displays the name of the fact that has been modified because of the rule execution. This modified fact is then passed by the Decision Service service component to the BPEL service.

    Popped ruleset

    Displays the name of the ruleset for which execution is complete and so, the ruleset is taken out of the execution queue.

    Note:

    The entry Invoked Decision Service Name appears differently in different scenarios:

    • For AS10.1.3.x to AS11 upgraded rules dictionaries with AssertExecuteWatch patterns, the entry appears in the trace report as Invoked Decision Service.

    • For AS10.1.3.x to AS11 upgraded rules dictionaries with CallFunction patterns, the entry appears in the trace report as Invoked Decision Function.

    • For AS11 created dictionaries, the entry is displayed as Invoked Decision Function.

    Click the nodes of the execution trace to see the corresponding engine state in the Business Rules: Engine State section of the page. This section contains the following panels:

    Facts in Working Memory: This panel displays the tree of objects that have been asserted and are currently being reasoned on by the service engine. These objects can lead to subsequent rule activations or firings and are the ones that can be modified or retracted as part of rules.

    Rule Set Stack: This panel displays which rulesets are currently in the stack and which one of those is at the top of the stack. Once all activated rules within that ruleset are fired, the next ruleset goes to top of stack and the first ready-to-fire rule in that ruleset is fired next.

    Rule Activation: This panel displays the list of rules that have fired as well as those that have been activated but not yet fired.

    A rule can be activated but not fired if the ruleset that contains the rule is not at the top of the stack or if there is a rule in the same ruleset that is deemed to have a higher priority according to the service engine's conflict resolution semantics.

21.3.2 Tracing Rule Execution at the Production Audit Level

Setting the audit level to Production provides a truncated report on the rule execution trace. It only displays the ruleset and the rules that have been fired and does not display details about facts, rule activation, and so on.

The process of production-level tracing is similar to the development-level tracing. However, for Production-level tracing, you must do the following:

In Fusion Middleware Control, after opening the composite, select Production from the Composite Audit Level of the Settings menu.

Figure 21-1 shows the Flow Trace page that displays the trace report.

Figure 21-1 Flow Trace Audit Trail - Production

Description of Figure 21-1 follows
Description of "Figure 21-1 Flow Trace Audit Trail - Production"

The Production-level trace report contains only the name of the ruleset and the rules that were fired. In addition, the Show rule set stack states in audit trail check box that provides a drill-down detailed trace report is unavailable in the Production-level trace report.

21.4 Monitoring Decision Service Service Component Logs

You can monitor Decision Service service component logs. Decision Service service components are also called business rules service components in the Oracle Fusion Middleware documentation.

21.4.1 Viewing Decision Service Service Component Logs

To view Decision Service service component logs:

  1. In the navigation tree, select and right-click soa-infra.
  2. Select Logs > View Log Messages. This displays the Log Messages page.

    The Log Messages page opens. Use this page to select target log files.

21.4.2 Setting the Diagnostic Logging Level with a Log Configuration

Use the Log Configuration page to configure the logging level.

To set the diagnostic logging level with a log configuration:

  1. Right-click soa-infra, and select Logs > Log Configuration.
  2. To configure the Decision Service service component logging level, expand the oracle.soa.service.rules and the oracle.soa.services.rules.obrtrace loggers and set the notification level.