JBoss.org BPM Life Cycle

BPM Life Cycle: Monitor

To monitoring your processes, you first need the ability to know what happening at runtime. Process listeners can be used to listen to different kinds of events occuring at runtime, like process instances being started or node instances being completed, etc. This information could then be used to create history logs (for reporting or static analysis purposes), or to dymanically analyze and respond using Business Activity Monitoring (BAM).

Process events

The Drools Flow engine generates events whenever something important occurs at runtime. This includes events for when a process instance has been started or completed, when a node instance has been triggered or left, etc. Process events listeners can be added to listen to (a subset of) these events.

These events can also be stored so they can be used to figure out what is going on at runtime. Drools Flow provides an audit event listener that generates XML-based audit logs. These audit logs can be inspected manually or visualized in a tree-based visualization using the audit viewer that is part of the Drools Eclipse plugin.

Finally, these events could also be used to create a process history log in a database. This history log contains all relevant information about the execution of process instances. Drools Flow provides a history listener that creates a history log of all process-related actions in the database. This history log can then be used for querying, reporting or analysis.

Web-based management console

Drools processes can be managed through a web console. This includes features like managing your process instances (starting/stopping/inspecting), inspecting your (human) task list and executing those tasks, and generating reports. The following screencast shows the management console in action, using a simple process containing some human tasks.


By adding a history logger to the process engine, all relevent events can be stored in a database. This history log can be used to monitor and analyze the execution of your processes. Drools Flow uses the Eclipse BIRT (Business Intelligence Reporting Tool) to create reports that show the key performance indicators. Its easy to define your own reports yourself, using the predefined data sets containing all process history information, and any other data sources you might want to add yourself. The Eclipse BIRT framework allows you to define data sets, create reports, include charts, preview your reports, and export them on web pages. The following screen shot shows a sample on how to create such a chart.

The next figure displays a simple report based on some history data, showing the number of requests per hour and the average completion time of the request during that hour. These charts could be used to check for an unexpected drop or rise of requests, an increase in the average processing time, etc. These charts could signal possible problems before the situation really gets out of hand.

Business Activity Monitoring (BAM): engine

Drools Fusion provides numerous features that make it easy to process large sets of events. This can be used to monitor the process engine itself. This can be achieved by adding a listener to the engine that forwards all related process events, such as the start and completion of a process instance, or the triggering of a specific node, to a session responsible for processing these events. This could be the same session as the one executing the processes, or an independent session as well. Complex Event Processing (CEP) rules could then be used to specify how to process these events. For example, these rules could generate higher-level business events based on a specific occurrence of low-level process events. The rules could also specify how to respond to specific situations. The following screencast shows how a simple CEP rule could be used to monitor the number of started process instances in a specific time frame.

Business Activity Monitoring (BAM): console

Monitoring process-related information like the one stored in the history log or analyzed using the BAM engine should not just be printed out to a console, but displayed using charts, graphs, etc. The Service Activity Monitoring (SAM) project is a project that is planning to offer just that. A GWT-based web console allows you to view charts that monitor your services. We have created a simple example, using this project, that generates a chart that continuously shows the number of started process instances, as shown in the next screencast. While its functionality is still very limited, I hope this already shows the direction we're going.

JOPR integration

Drools brings support to the JMX standard and enables knowledge base and knowledge session monitoring and inspection using any JMX console.