16 Monitoring BPEL Process Service Components and Engines

This chapter describes how to monitor the flow trace of a business flow instance, the time distribution of BPEL process activities and instances and faults throughput metrics, the service engine requests and thread performance statistics, the deployed BPEL process service components, and the statistics about the time a request spends in the service engine.

This chapter includes the following sections:

For conceptual information about service components and service engines, see the following sections:

Note:

You see any type of fault on the Flow Instances page (for example, fault policy faults, BPEL message recovery, rejected messages, EDN faults, and so on). All faults are part of the business flow instance details. For information, see Tracking Business Flow Instances at the SOA Infrastructure or Partition Level.

16.1 Monitoring the Flow Trace of a Business Flow Instance

This section describes how to monitor the flow trace of a business flow instance. The flow trace is a runtime trail of the message flow. A business flow instance corresponds to an end-to-end business transaction. Business flows consist of a single SOA composite application or multiple SOA composite applications connected together to fulfill a specific business process. The flow trace of a business flow instance is identified by a unique flow ID value that is displayed in the Search Results table of the Flow Instances page after you invoke a flow instance search.

Note:

This section assumes a business flow instance has been initiated. If not, see Initiating a Test Instance of a Business Flow for instructions.

To monitor the flow trace of a business flow instance:

Access the Flow Trace page through one of the following options:

  1. To access business flow instances in all partitions:


    From the SOA Infrastructure Menu... From the SOA Folder in the Navigator...
    1. Select Home.

    2. Select the Flow Instances tab.

    3. Click the Search icon to populate the Search Results table with business flow IDs.

    4. In the Flow ID column, click a specific business flow instance number.

    1. Expand SOA folder.

    2. Right-click soa-infra.

    3. Select Home > Flow Instances.

    4. Click the Search icon to populate the Search Results table with business flow IDs.

    5. In the Flow ID column, click a specific business flow instance number.


  2. To access business flow instances in an individual partition:


    From the SOA Infrastructure Menu... From the SOA Folder in the Navigator...
    1. Select Manage Partitions.

    2. In the SOA Partitions column, click a specific partition.

    3. Click the Flow Instances tab.

    4. Click the Search icon to populate the Search Results table with business flow IDs.

    5. In the Flow ID column, click a specific business flow instance number.

    1. Expand SOA > soa-infra.

    2. Click a specific partition.

    3. Click the Flow Instances tab.

    4. Click the Search icon to populate the Search Results table with business flow IDs.

    5. In the Flow ID column, click a specific business flow instance number.


The Flow Trace page consists of two sections. Depending on which tab is selected, the top section shows the Faults, Composite Sensor Values, Composites, or Resequencer (if an Oracle Mediator resequencer is included in the composite) tabs of the selected flow trace. The bottom section shows the business flow trace.

The Faults tab of the Flow Trace page displays the following details:

  • A Faults table that displays the error message, component that handled the fault, time of the fault, and recovery status (for example, unrecoverable, recovery required, and so on). To display additional columns in the table, select View > Columns. If you change the columns in the Flow Instances page, they are also changed in the Faults table of the Flow Trace page.

  • A Trace table that displays the sequence of the message flow through the services, service components, and references that comprise SOA composite applications. Regardless of the tab that you select on the Flow Trace page (Faults, Composite Sensor Values, Composites or Resequencer (if an Oracle Mediator resequencer is included in the composite), the Trace section is always displayed. To display additional columns in the table, select View > Columns. To view the flow trace in XML format, select the Actions list.

    If the Audit Level is set to Off, trace details are not captured and the trace table is not displayed. However, instance details for some components are captured. For those components, a flat list of instance details is displayed. This list only has instance details for some components and may not have all components that participated in the flow.

    Midprocess receive activities that are triggered by events are displayed in the flow trace. Midprocess receive activities can co-relate multiple flow IDs. The flow trace on the correlating BPEL node can display all the flow IDs that are correlated by that node.

You can perform the following flow trace management tasks:

16.1.1 Recovering from Faults in the Flow Trace

You can perform fault recovery from the Faults tab of the Flow Trace page. The fault recovery tasks that you perform are the same as those performed from the Faults tab of the Flow Instances page of the SOA Infrastructure or individual partition.

The Faults section shows the faults occurring in the services, service components, and references of the SOA composite application displayed in the Trace section. Selecting a fault highlights one or more rows in the Trace section in which the fault occurred (because multiple rows can correspond to the same fault if they are in the same fault chain). For example, a recoverable fault on a BPEL component can cause failed instances of other components and endpoints downstream. Selecting that BPEL process fault in the Faults table highlights all impacted Trace section nodes.

To recover from faults in the flow trace:

  1. Access the Flow Trace page as described in Monitoring the Flow Trace of a Business Flow Instance.
  2. Select a fault in the Faults section.

    This highlights the row in the Trace section in which the fault occurred.

  3. Initiate a fault recovery through one of the following options:
    • From the Recover list, select a recovery option (for example, Abort or Retry).

    • In the Error Message column, click the error to display a detailed error message and options for performing fault recovery (for example, Abort or Retry).

    • In the Recover column, click Recovery Required.

    For instructions about recovering from faults, see Step 5 of Recovering from Faults in a Business Flow Instance.

    If recovery is successful, the fault is cleared from the Faults section and Trace section of the Flow Trace page.

16.1.2 Viewing Composite Sensor Values in the Flow Trace

You can view details about composite sensors included in the flow trace of the business flow instance. Composite sensors provide a method for implementing trackable fields on messages. Composite sensors can be added to service and reference binding components and service components that have subscribed to business events during design time in Oracle JDeveloper.

To view composite sensor values in the flow trace:

  1. Access the Flow Trace page as described in Monitoring the Flow Trace of a Business Flow Instance.
  2. Click the Composite Sensor Values tab to display composite sensors in the business flow instance.

    This highlights the row in the Trace section in which the composite sensor data was collected. Closing the sensor clears the selection in the Trace section.

16.1.3 Viewing the SOA Composite Application in the Flow Trace

You can view the initiating and participating SOA composite applications included in the flow trace of the business flow instance.

To view the SOA composite application in the flow trace:

  1. Access the Flow Trace page as described in Monitoring the Flow Trace of a Business Flow Instance.
  2. Click the Composites tab.

    The initiating and participating composites in the flow trace of the business flow instance are displayed. If you set a value for the business flow instance title during design time in Oracle JDeveloper, it is displayed in the Name column.

    For information about setting the business flow instance name, see Section "How to Set the Flow Instance Name or Composite Instance Name at Design Time" of Developing SOA Applications with Oracle SOA Suite.

16.1.4 Viewing the Audit Trail and Process Flow in the Flow Trace

You can view the audit trail and process flow in the flow trace of the business flow instance. The audit trail and flow trace provide a graphical representation of the audit trail data. The audit trail displays execution details about the activities in the BPEL process. The process flow displays the flow of the payload through the process.

To view the audit trail and process flow in the flow trace:

  1. Access the Flow Trace page as described in Monitoring the Flow Trace of a Business Flow Instance.

    The Trace section displays the sequence of the message flow through the services, service components, and references that comprise the SOA composite application. For this example, the service binding component, service components, and reference binding component involved in the flow have successfully received and processed messages.

  2. In the Instance column of the Trace section, click a specific BPEL process service component. Service components can be accessed from the Flow Trace page; services and references cannot be accessed.
  3. Select the Highlight Faults checkbox to highlight any faults in the audit trail.
  4. From the View list, select Audit trail XML to view the XML output of the audit trail. You can save the XML output as a file.
  5. Scroll through the audit trail to check for errors and click the View Payload links to view their contents at a given point in the flow.

    Note:

    • Canceled onMessage branches of pick or scope activities that did not execute are displayed in the audit trail. However, the flow diagram does not show these same canceled onMessage branches. This is the expected behavior.

    • The following error message appears when a transaction is displayed as rolled back in the Audit Trail page:

      The transaction was rolled back. The work performed for bpel
      instance "instance_ number" was rolled back to the previous
      dehydration point,  but the audit trail has been saved.
      You can recover the instance from the recovery console by
      resubmitting the callback message or activity for execution
      

      This message does not specifically state whether recovery should happen on either the activity or the callback. This is the intended behavior. Oracle recommends that you do not recover each instance through the audit messages. Instead, set up automatic recovery to recover these instances.

  6. Click the Flow tab.

    A flow diagram of the activities in the BPEL process is displayed. Any faults in the flow diagram are highlighted.

  7. Click an activity to view the flow of the payload through the process.

    Note:

    If using Microsoft Internet Explorer, you can click Copy details to clipboard to copy the activity details to the clipboard. If using Mozilla Firefox, this link does not appear. Instead, you must manually select the text, and copy and paste it to a file.

  8. Scroll through the flow diagram to check for errors.
  9. Click a highlighted activity to view error messages.
  10. Close the message.

16.1.5 Monitoring Fault, Activity, and Variable Sensors in the Flow Trace

You can view the fault, activity, and variable sensor data in a BPEL process service component. You design sensors in BPEL processes in Oracle JDeveloper. Sensors enable you to monitor BPEL process activities, variables, and faults during runtime.

To monitor fault, activity, and variable sensor data in BPEL processes:

  1. Access the Flow Trace page as described in Monitoring the Flow Trace of a Business Flow Instance.
  2. Click a specific BPEL process service component in the Instance column of the Trace section.
  3. Click the Sensor tab.
  4. Expand a sensor type to view details.

    If you created JMS sensors in your BPEL process, JMS sensor values are not displayed in Oracle Enterprise Manager Fusion Middleware Control. Only sensor values in which the sensor action stores the values in the database are displayed (for example, database sensor values).

    For more information about sensors, see Chapter "Using Oracle BPEL Process Manager Sensors and Analytics" of Developing SOA Applications with Oracle SOA Suite.

    For more information about fault recovery, see Recovering from Faults in a Business Flow Instance and Performing BPEL Process Service Engine Message Recovery.

16.1.6 Understanding Additional Flow Trace Behavior Scenarios

This section describes additional flow trace behavior scenarios.

16.1.6.1 Behavior of Activity Sensors in Compensate and CompensateScope Activities in BPEL 2.0

Assume you have an activity sensor in a BPEL 2.0 compensateScope activity with the evaluation time set to completion and have also configured the activity's variable sensor to point to a variable. You may expect that when the sensor is triggered, the compensation activity completes and the variable shows the state that it is in at the completion of the compensation activities.

However, note that the compensateScope activity (and also a compensate activity) ends immediately after passing control to the compensation activities. As a result, the activity's variable sensor shows the state that it is in at the beginning of the compensation activities, rather than at the end.

This is the expected behavior.

As a workaround for obtaining the variable state upon completion of compensation, add an empty activity after the compensate or compensateScope activity and set the activity sensor on the empty activity with an evaluation time set to activation.

16.2 Monitoring the Time Distribution of BPEL Process Activities and Instance and Fault Throughput Metrics

You can monitor the time distribution of BPEL process activities and a graphical view of instance and fault throughput metrics for the BPEL process service component.

To monitor the time distribution of BPEL process activities and instance and fault throughput metrics:

  1. Access this page through one of the following options:


    From the SOA Infrastructure Menu... From the SOA Folder in the Navigator...
    1. Select Home.

    2. Select the Deployed Composites tab.

    3. In the Composite section, select a specific SOA composite application.

    1. Under soa-infra, expand the partition.

    2. Select a specific SOA composite application.


    The Dashboard page is displayed.

  2. In the Components section, select the BPEL process service component.

    The Dashboard page displays the following details:

    • Details about the time distribution for activities, including the activity name, the total number of activities for all instances, and the average execution time.

    • A graphical representation of the number of successful, faulted, and incoming (pending) instances of the BPEL process service component over a specific time range.

  3. Click Table View to display throughput details for the last five minutes in tabular form, including the throughput for successful instances, the total faults throughput, and the instance throughput.

For more information, see Introduction to Business Flow Instances and Administering Oracle Fusion Middleware for details about viewing and searching log files.

16.3 Monitoring BPEL Process Service Engine Request and Thread Performance Statistics

You can monitor request and thread performance statistics for all BPEL process service components running in the service engine.

To monitor BPEL process service engine request and thread performance statistics:

  1. Access this page through one of the following options:


    From the SOA Infrastructure Menu... From the SOA Folder in the Navigator...
    1. Select Service Engines > BPEL.

    1. Right-click soa-infra.

    2. Select Service Engines > BPEL.


  2. Click Statistics.

    The Pending Requests and Active Requests sections of the Statistics page display the following details. Click the Help icon for additional information.

    • Pending requests in the service engine

    • Active requests in the service engine

    The Thread Statistics and Request Breakdown parts of the Statistics page display details about the number of active threads and the count and minimum, maximum, and average request processing times in the service engine.

    For more information about BPEL process tuning and performance, see Tuning Performance.

16.3.1 Viewing Low Level Request Breakdown Table Details

You can configure the Request Breakdown part of the Statistics page to display lower level details about the time a request spends in various service engine layers during processing. You may need to scroll down the Statistics page to view this part.

Configure the StatsLastN property under the More BPEL Configuration Properties link on the BPEL Service Engine Properties page. By default, this property is set to -1. You can set this property to a more appropriate value (for example, 1000). This property provides information that helps you analyze and isolate areas that may become potential trouble spots.

For information about accessing and configuring this property, see Configuring BPEL Process Service Engine Properties.

The information that is displayed on the Request Breakdown part of the Statistics page after configuring the StatsLastN property is also displayed with the following System MBean Browser properties:

  • AsyncProcessStats: Provides low level asynchronous process statistics.

  • SyncProcessStats: Provides low level synchronous process statistics.

  • RequestStats: Provides a low level request breakdown.

For information about accessing these properties, see Viewing Statistics About the Time a Request Spends in the BPEL Process Service Engine.

16.4 Monitoring Deployed BPEL Process Service Components in the Service Engine

You can monitor all deployed SOA composite applications with BPEL process service components running in the service engine.

To monitor deployed BPEL processes in service engines:

  1. Access this page through one of the following options:


    From the SOA Infrastructure Menu... From the SOA Folder in the Navigator...
    1. Select Service Engines > BPEL.

    1. Right-click soa-infra.

    2. Select Service Engines > BPEL.


    The Deployed Components page displays the following details:

    • A utility for searching for a specific deployed SOA composite application by specifying criteria and clicking Search. This search is case sensitive. You must enter the exact name of the component and the exact name of the composite, without the revision portion. To view an unfiltered list of all components after searching, click Reset.

    • Details about deployed SOA composite applications with BPEL process service components running in this service engine, including the service component name, the SOA composite application, and the current status (up or down).

  2. In the Name column, click a specific service component to access its home page.

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

16.5 Viewing Statistics About the Time a Request Spends in the BPEL Process Service Engine

You can display lower level details about the time a request spends in various service engine layers during processing with several System MBean Browser properties.

  1. In the navigation tree, expand the SOA folder.
  2. Right-click soa-infra, and select Administration > System MBean Browser.
  3. Select Application Defined MBeans > EMDomain > Server: server_name > Application: soa-infra > EMIntegration > soa-infra.

    The following properties can be configured.

    • AsyncProcessStats: Asynchronous process statistics

    • RequestStats: Request breakdown statistics

    • SyncProcessStats: Synchronous process statistics

  4. View the content of the AsyncProcessStats property.
  5. View the content of the RequestStats property.
  6. View the content of the SyncProcessStats property.

For information on configuring this information with the StatsLastN property on the BPEL Service Engine Properties page, see Configuring BPEL Process Service Engine Properties.