IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Developing monitor models > What are monitor models? > Monitor details models

Metrics

A metric is a holder for information, typically a business performance measurement, in a monitoring context. A metric can be used to define the calculation for a key performance indicator (KPI), which measures performance against a business objective.

Examples of metrics are the working duration of a process, the name of the user assigned to a task, a supplier's response time, and the cost of the risk assessment step in an insurance process.

As an example, assume created a metric named Order Cost to measure the order cost for each instance of an order handling process. Typically, each time the order handling process runs, it produces a different result.

For example, for three instances of the process, the order costs could have the following values.

Instance Order cost
1 175.00
2 145.50
3 125.75

To find the average, maximum, minimum, or total order costs for multiple processes, you create a KPI that uses an aggregation function (such as average or total) and points to the Order Cost metric. You might create KPIs named Average Order Cost and Total Order Cost.

The value of a metric can be determined based on another value, such as an attribute of an inbound event or the value of a counter. It can also be based on a calculation or calculations.

For example, if you have two metrics named Shipping Date and Order Date that obtain their values from inbound event attributes, you could also have a Shipping Duration metric that subtracts Order Date from Shipping Date, providing you with the shipping duration for each instance of the process.


Metric value expressions

Every metric is associated with one or more expressions that define how the metric gets its value. Each expression can also have a trigger.

The metric value expression is evaluated when any of the following events occur:

You might want to use a trigger for any of the following reasons:

For example, if you have metric C that is calculated by the expression metric A / metric B, you might not want to update the expression until you are sure that metric B is not 0. You could also have a metric that tracks the state of a task and has different values (such as started and stopped), which are set by trigger-controlled expressions when events reporting the task's status change are detected.

The metric value expression can reference other metrics in the monitoring context. It can also use the values carried by events. In addition to system-defined functions, you can employ user-defined XML Path Language (XPath) functions in metric calculations.

The following examples show how you might define metric value expressions for metrics named Time To Fulfill, Total Cost, Average Cost, and Running Time:

If you are using an Oracle database and a required metric evaluates to the empty string, an attempt is made to store a null value in a database column, which results in an error at run time. Verify that the value expression will not evaluate to the empty string if you are using an Oracle database.

Monitor details models