Developing the monitoring application
The BPEL process defined above is monitored by a monitor application, which consists of a single monitoring context that receives all emitted events from the BPEL.
The monitoring context defines two custom metrics that capture the following data from the incoming events:
- Order Status of type
String, which captures the status of an order after it is processed by the BPEL. The valid values of this metric are:
- Order Date of type
datetime, which captures the date when the order was placed.
Figure 3 shows how these custom metrics are defined in a monitoring context called mybpel.
Figure 3. Custom metrics in the monitoring context
A cube is created in the Dimensional Model tab of the monitoring
model for the mybpel monitoring context. The
Total no. of processed orders business
measure is defined in this cube, using
Count as an aggregate function to calculate
the total number of orders processed. This business measure is
calculated by counting all the orders processed by the order
The cube also contains a dimension with the following two dimensional levels:
- Order status - populated by the
- Order date - populated by the
Datetime type of metrics, if used as
dimensions, automatically create three dimensional levels - year,
month and date. However, if you want to track a business measure to
the level of a specific hour in a day or a minute in an hour, you can
datetime metric to a
String using built-in functions and define
separate custom metrics for
by using the
substring() function, as shown
in Figures 4 and 5.
Figure 4. Defining custom date/time metrics
Figure 5. Defining custom measures and dimensions for Date/Time metrics
The monitoring application also defines a KPI called
duration of the process,
which is not the focus of discussion for this article.
Figure 6. Defining KPIs