Monitoring a composite sensor

This recipe presents the continuation of the previous two recipes where we first defined and then added composite and BPEL sensors. In this recipe, we will walk through the monitoring of the composite sensors as well as the monitoring of the BPEL sensors. As a result of the composite sensor monitoring, we get better information on the happenings inside the BPEL process. This recipe will explore the possibilities of monitoring a composite sensor from the Oracle Enterprise Manager Console.

Getting ready

For this recipe, we will use the composition defined in the Defining composite sensors and Adding a composite sensor recipes.

How to do it…

First, you will have to initiate the BPEL process:

  1. Check the execution status of the recent running instance in the Oracle Enterprise Manager Console and select the BPEL process instance from the BPEL process dashboard. Under Flow Trace, you'll find a screen as shown in the following screenshot:
    How to do it…

    In the preceding screenshot, in Trace, you can see that the BPELProcessSeq instance finished in the Faulted state. The BookHotelSvc and RoomPriceSvc instances finished successfully. However, you can see that BookCarSvc had problems. Without further investigating the trace of the BPEL process, check the composite sensor value. It indicates two dates in a from-to pair. You will immediately spot that the from-date is greater than the to-date. This indicates that there might be some problems with the inserted dates.

  2. You will have to further investigate the root cause of the problem. Click on the link of the faulted BPEL component. The details of the BPEL process instance opens as shown in the following screenshot:
    How to do it…

By selecting the Sensor Values tab, you will notice that the fault sensor was fired. By checking the details of the fault sensor, you can see that, the problem occurred because of the dates. If we also had the Oracle BAM server instance running, you could configure the composite sensors to provide data for BAM. This will enable us to monitor the BPEL process through a BAM solution.

How it works…

The sensors are evaluated as the composite is executed. The value of the sensor depends on the criteria we set as the condition. You can monitor the input or output messages on the composite. Furthermore, you can monitor variables, activities, or faults in the BPEL processes. Depending on what sensor action you define, the evaluated values of sensors can be sent to different locations (please read the Sensor action section in the Defining composite sensors recipe).

The evaluated values of composite sensors that have the database sensor action defined are stored into the database. The name of the table is COMPOSITE_SENSOR_VALUE and it is defined in the DEV_SOAINFRA schema. We can query the sensor values by composite_instance_id or by the sensor name:

select * from DEV_SOAINFRA.COMPOSITE_SENSOR_VALUE where SENSOR_NAME = 'HotelSensor';

Note

The preceding code applies only to composite sensors that have the database sensor action defined.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset