IBM WebSphere Business Monitor V6.1 is a comprehensive business activity monitoring (BAM) solution that provides a near real-time view of your business performance. BAM can provide visibility into the performance of business activities by processing events, calculating business metrics, and presenting key performance indicators through business dashboards. Users can track current business performance against expectations and analyze trends over time.
The value of business monitoring increases with the number of business events to be monitored. One of the most important questions asked about any business monitoring solution is "How do I publish events from my application, message flow, or business process?" The following list summarizes a range of options for sending events to WebSphere Business Monitor. Common IBM products that serve as event sources:
- WebSphere Process Server
- WebSphere Business Services Fabric
- WebSphere Enterprise Service Bus
- WebSphere Business Events
- WebSphere Message Broker
- WebSphere MQ Workflow
- IBM FileNet® P8
- WebSphere DataPower® X150
Each of these products in turn offers a range of connectivity options. For example, you could use a WebSphere Adapter with WebSphere Enterprise Service Bus to get data from an application such as SAP, mediate the information into an event, and send it to WebSphere Business Monitor.
The applicable IBM product Infocenters have more information about configuring the product to produce events. The IBM Redbook Business Activity Monitoring with WebSphere Business Monitor V6.1 addresses various ways of sending events to WebSphere Business Monitor.
Though the above products and samples already provide wide coverage, many businesses will implement a portion of their overall business activity through other environments. What is the solution for getting events from these sources? This article and Part 14 describe an additional approach: using Web services to publish events from essentially any client application capable of being a Web service client. Because Web services provide platform and programming language flexibility, this approach will be valuable to many WebSphere Business Monitor customers.
Clearly, WebSphere Business Monitor offers many choices for obtaining events, as shown in Table 1.
Table 1. Recommended approaches for sending events
| Event source | Description | References |
|---|---|---|
| WebSphere MQ-enabled applications | Many applications are already "MQ enabled," so a common approach is to route an event message to WebSphere Business Monitor through an MQ queue. | "Enabling WebSphere Business Monitor V6.1 to receive events via WebSphere MQ" provides details. |
| Java applications | The best practice for gathering event data, mediating it into a business event, and sending the event to WebSphere Business Monitor is to use one of the IBM connectivity products listed above. In cases where this is not an option, you can create a custom emitter. A sample emitter is available. | Business Activity Monitoring with WebSphere Business Monitor V6.1 provides a sample Java application that sends events from a simple file using Java application programming interfaces (APIs). |
| Database applications | A best practice for obtaining events from a database is to use a connectivity product with the WebSphere Adapter for Java Database Connectivity (JDBC). If this is not an option, you could use a trigger from IBM DB2® or Oracle to detect a business change, mediate the data into an event, and send that event to WebSphere Business Monitor. | WebSphere Business Monitor samples provides a sample DB2 event emitter. |
| Java Web service | A custom application may benefit from using a standard Web service invocation for emission of a business event. | This article |
| .NET Web services | For environments that make use of the .NET framework from Microsoft, and which are not integrated with one of the listed IBM products, a natural approach may be to send events using a Web service. | Part 14 of this series. |
This article and Part 14 focus on the last two options in Table 1: using Web services to publish events from essentially any client application capable of being a Web service client.
This article begins with a short background on how events flow to WebSphere Business Monitor. An overview of the specific Web services standard used (WS-Notification, the OASIS standard for publishing messages) is provided. You will learn how to configure WebSphere Business Monitor to receive events through WS-Notification. You will also go through a sample WS-Notification producer that uses Java client bindings to send sample events to the mortgage lending model. The steps for configuring and enabling the flow of event information are included.
Part 14 describes how to use the same style approach with .NET clients. It shows how common Microsoft environments can serve as sources of business events for WebSphere Business Monitor.
How events flow to WebSphere Business Monitor
WebSphere Business Monitor server is built on J2EE and runs on WebSphere Application Server using a relational database such as DB2 or Oracle for persistence. Events are taken out directly by monitor model applications from a set of Java Messaging Service (JMS) queues—one input queue per monitor model application. WebSphere Business Monitor exploits the common event infrastructure (CEI) component of WebSphere Application Server for filtering and distribution of events to WebSphere Business Monitor JMS input queues. CEI then uses the messaging provider built into WebSphere Application Server V6 for the actual communication of messages to the monitor model queues. This messaging provider is called the service integration bus (SIBus), and it provides publish and subscribe functions to other server components and applications such as those written using the JMS.
Previous developerWorks articles have described other approaches for getting events to CEI. For example, "Enabling WebSphere Business Monitor V6.1 to receive events via WebSphere MQ" describes how to use WebSphere MQ-enabled applications to publish events to WebSphere Business Monitor.
This article focuses on using WS-Notification to publish an event message as input to CEI. In this case, CEI is still used for event filtering and distribution to the actual monitor model input queues. Hence, WS-Notification serves as a simple Web services interface in front of CEI.
WS-Notification has been described as âpub/sub for Web services.â WS-Notification is actually a family of related white papers and specifications, ratified through the OASIS standards body, that define a Web services approach to notification using a topic-based publish and subscribe pattern. The standards-based approach ensures that applications written by different vendors or teams can easily share information. Using Web services means that developers can write applications in a variety of languages and on different software platforms.
WS-Notification is actually composed of three separate specifications: WS-BaseNotification, WS-BrokereredNotification, and WS-Topics. Because WS-Notification has been available for several years, IBM and other vendors have produced a wide range of articles, documentation, and associated collateral for using the standard.
WebSphere Application Server 6.1 supports V1.3 of the WS-Notification family of specifications. For this article, we are interested in the specific case of sending events to WebSphere Business Monitor. WS-Notification in the WebSphere Application Server can be used in many more scenarios.
Interaction flow across components
To understand how to configure WebSphere Business Monitor to receive events through WS-Notification, first let's review the interaction of the two event and message components described earlier, SIBus and CEI. CEI uses SIBus in two ways:
- CEI can receive event messages using SIBus through a JMS topic or queue.
- CEI uses SIBus to publish event messages to JMS topics or queues using the filtering logic defined in CEI event groups.
SIBus messaging engines provide the actual delivery of event messages, and CEI provides an event abstraction for filtering and distribution based on event group expressions.
The next piece of the puzzle is how WS-Notification and SIBus can integrate. The WS-Notification implementation in
WebSphere Application Server can be configured to use SIBus for messaging transport.
You can configure the WS-Notification service
to put a message on a SIBus topic or queue whenever the WS-Notification service
Notify() operation is invoked by a client.
With this in place, you can configure a flow of events from a WS-Notification
producer to WebSphere Business Monitor, as shown in Figure 1.
Figure 1. Flow of event messages

Starting on the left side of Figure 1:
- A WS-Notification client, acting as producer application, creates an event,
places the event into a NotificationMessage, and invokes the
Notify()operation on the NotificationBroker interface exposed by the WS-Notification service configured in WebSphere Application Server. - The WS-Notification service puts a message on a SIBus destination. This is configured through a defined relationship between the WS-Notification topic namespace and the SIBus topic space.
- CEI is configured to listen on the SIBus queue or topic. The CEI message-driven bean (included in CEI) is triggered when the message arrives.
- CEI filters based on event group definitions and publishes the event to the appropriate input destination for WebSphere Business Monitor.
- WebSphere Business Monitor processes the event.
Configuring WebSphere Business Monitor server for WS-Notification
You can use sample scripts in conjunction with this article to configure your WebSphere Business Monitor server to support the flow of event messages described above. The configuration scripts include two aspects:
- General enablement of the WS-Notification service with integration to SIBus in WebSphere Application Server
- Specific configuration of resources to flow events through SIBus and CEI to WebSphere Business Monitor
Step 1. Install and configure the SDO repository application in WebSphere Application Server
Because the example uses SIBus for enabling Web services, you need to use Service Data Objects (SDO) as the standard format to store and retrieve WSDL definitions. You need to create an SDO repository that can be implemented using a database engine of your choice. Instructions for this step are described in "Installing and configuring the SDO repository".
Step 2. Download configuration resources
A few resources, listed in Table 2, are included with this article. The Jython scripts and a properties file are in the monitor-wsn-downloads.zip file for you to download. Extract the files to a working directory.
Table 2. Resource files for configuring WS-Notification
| File | Description |
|---|---|
| configEventWSN.py | Script to set up necessary WS-Notification, JMS, SIBus, and CEI resources. |
| removeEventWSN.py | Script to uninstall the WS-Notification, JMS, SIBus, and CEI resources. |
| eventWSN.properties | Common resource names and properties used by the two scripts. |
Step 3. Edit the eventWSN.properties file
Information about your environment is in eventWSN.properties. Make sure to edit this file so it reflects the properties that are unique to your environment.
#Cell, node and server name of the WAS installation:
crtCellName =
crtNodeName =
crtServerName =
#Host where WAS is installed and the WAS HTTP_Transport Port:
host =
wsnPort =
#Path of the EventServiceMdb.jar file.
#This file should be located in EventServiceMdb.ear, which is usually
#located under the subdirectory tree under %WAS_HOME%/installedApps
#For example, when WebSphere Business Monitor toolkit is installed on WID 6.1,
#the EventServerMdb.jar files is located under:
#C:/IBM/WID61/pf/WBMonSrv_wps/installedApps/WBMonSrv_wps_Cell/EventService.ear
EventServiceMdb =
|
Step 4. Run the configEventWSN.py script
wsadmin -f <path>/configEventWSN.py -lang jython <path>/eventWSN.properties -profileName <profile> -conntype=SOAP |
where:<path> is the path where the scripts are.<profile> is the name of the profile created for your
monitor server, for example WBMon01.wsadmin is located in %WAS_HOME%/bin.
The following snippet shows a sample execution of the script on a WebSphere Business Monitor unit test server installed in WebSphere Integration Developer.
c:\ibm\WID61\runtimes\bi_v61\bin\wsadmin -f c:\ibm\dev\WSN\scripts\configEventWSN.py -lang jython c:\ibm\dev\WSN\scripts\eventWSN.properties -profileName WBMonSrv_wps -conntype=SOAP |
Restart WebSphere Application Server for the definition of the bus and JMS JNDI resources to take effect.
If security is enabled on your WebSphere Business Monitor server installation, but you do not wish to use Web services security during your initial WS-Notification client testing, you can disable security on the CommonEventInfrastructure_Bus service integration bus.
When executed, the configEventWSN.py script performs the following actions, which result in the configuration shown in Figure 1.
- Creates a WS-Notification service.
- Creates an endpoint listener.
- Creates a WS-Notification service point.
- Creates an SIB destination for messages inbound to CEI.
- Creates a WS-Notification topic namespace.
- Creates a new JMS topic for messages inbound to CEI.
- Creates a new JMS topic that is used by CEI to publish to WS-Notification.
This is not used for sending events to WebSphere Business Monitor. Rather, it can be used to publish events to other WS-Notification consumers.
- Creates a CEI event group profile used by CEI to publish to WS-Notification.
- Creates a new JMS activation spec for the message-driven bean inbound to CEI.
- Installs and configures the CEI message-driven bean.
Now you're prepared to develop and test your WS-Notification client to send events to WebSphere Business Monitor.
Developing a WS-Notification client as an event source
As mentioned, the IBM Redbook Web Services Handbook for WebSphere Application Server 6.1, Chapter 22, explains how to write WS-Notification applications using the WebSphere Application Server toolkit. This section covers the highlights specifically related to sending business events to WebSphere Business Monitor from a WS-Notification producer.
Table 3 summarizes the steps for creating and testing the event producer. The detailed steps follow the table.
Table 3. Steps to create and test the client
| Task | Tool |
|---|---|
| 1. Export WSDL documents that describe the WS-Notification service. | WebSphere Application Server administrative console |
| 2. Create client application. Optionally, generate a Web services proxy to simplify the development of your producer. | An integrated development environment (IDE), such as IBM Rational® Application Developer or the WebSphere Application Server toolkit |
| 3. Edit client to populate a NotificationMessage with event data. | An IDE, such as Rational Application Developer or the WebSphere Application Server toolkit |
| 4. Add Java code to the client to invoke the Notify() operation of the NotificationBroker interface. | An IDE, such as Rational Application Developer or the WebSphere Application Server toolkit |
| 5. Run and test the client application, sending events to WebSphere Business Monitor. | IDE, debugger, or command line execution of the application |
Step 1. Export WSDL documents that describe the WS-Notification service
To begin, you need to retrieve the WSDL documents that describe the service you want to invoke from the client.
- From the WebSphere administrative console, select Service integration -> Web services -> WS-Notification services, then select the service to which you want to publish messages.
- From the Related Items list, select Notification broker inbound service settings.
- Under Additional Properties, select Publish WSDL files to ZIP file, as
shown in Figure 2.
Figure 2. Exporting WSDL for the Notification broker inbound service
- Click the zip file name (for example, WSNServiceNotificationBroker.zip) and save it to a folder.
Step 2. Create client application
This example uses Rational Application Developer as the IDE. To generate a starting point client application:
- Create a J2EE client application project called
WSNProducerClient. - Create a folder under the parent project folder to contain the WSDL you exported in the previous step.
- Import the zip file containing the WSDL files to this new folder.
- The primary WSDL file of interest is CommonEventInfrastructure_Bus.WSNServiceNotificationBrokerService.wsdl.
It contains the definition of the
Notify()operation that you will invoke from the client.From within the J2EE perspective, right click on this WSDL file and select Web Services -> Generate Client, as shown in Figure 3.
Figure 3. Launch Web service client wizard
As you use the wizard, you can use the typical defaults. Be sure to choose Java Proxy as the client type, as shown in Figure 4.
Figure 4. Generating a WS-Notification client from the WSDL
After you complete the wizard, a number of new classes are created to serve as your Java proxy for the NotificationBroker. The classes are generated into the com.ibm.www package. A number of helper packages are also generated. A reference to the Web service is added to the deployment descriptor. Two of the important files are:
- NotificationBrokerProxy.java - code that abstracts some of the more complicated aspects of invoking the service.
- Main.java - where you insert new code for preparing and sending events.
The development and test resources in Table 4 are in the monitor-wsn-downloads.zip file.
Table 4. Sample files
| File | Comments |
|---|---|
| Main.java | Sample Java application that uses the generated NotificationProxy to prepare and send events to WebSphere Business Monitor. |
| events.xml | Sample Common Base Event (CBE) to use for testing. |
Step 3. Edit client to populate a NotificationMessage with event data
You now have the basic structure of your producer application and are ready to add the logic to create and send messages. The full source code for this example can be found in Main.java, which you downloaded in the previous step. The following steps walk through snippets of the code.
First, focus on creating the necessary NotificationMessage object used as
input to the Notify() operation of the
Web service. Before going through the sample code, though, it's important to highlight that WebSphere Business Monitor expects to receive
events with an event "header" that adheres to the CBE schema. The business relevant data
for the event is placed in the "any" slot of the CBE header as an XML fragment.
The NotificationMessage data preparation steps are:
- Create the CBE data. In the example, we assume CBEs are contained in a file at path c:\\temp\\events.xml.
- Wrap the CBE into a
SOAPElement.SOAPElement messageContents = soapFactory .createElement("CommonBaseEvents"); messageContents.addNamespaceDeclaration("", "http://www.ibm.com/AC/commonbaseevent1_0_1"); messageContents.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance"); messageContents.setAttribute("xsi:schemaLocation", "http://www.ibm.com/AC/commonbaseevent1_0_1 commonbaseevent1_0_1.xsd"); for (int i = 0; i < events.length; i++) { // update creation timestamps long delta = System.currentTimeMillis() - events[i].getCreationTimeAsLong(); events[i].setCreationTimeAsLong(events[i].getCreationTimeAsLong() + delta); // update the global instance ID String globalInstanceId = (String) AccessController .doPrivileged(new PrivilegedAction() { public Object run() { return EventFactory.eINSTANCE .createGlobalInstanceId(); } }); events[i].setGlobalInstanceId(globalInstanceId); String foo = EventFormatter.toCanonicalXMLString(events[i], false); IBMSOAPFactory isf = (IBMSOAPFactory) soapFactory; SOAPElement sElement = isf.createElementFromXMLString(foo); messageContents.addChildElement(sElement); } - Create a
NotificationMessageobject, passing theSOAPMessageElementas a parameter to the constructor.// Create a notification message from the contents NotificationMessage message = new NotificationMessage(messageContents);
- Set the WS-Notification topic on the NotificationMessage.
// Add a topic expression to the notification message indicating to // which topic(s) the message corresponds. Map prefixMappings = new HashMap(); prefixMappings.put("topns", topic_ns); // Constructor: TopicExpression(java.net.URI dialect, // java.lang.String topic, // java.util.Map prefixToNamespaceMappings TopicExpression exp = new TopicExpression( TopicExpression.SIMPLE_TOPIC_EXPRESSION, "topns:cei_wsn_topic", prefixMappings); message.setTopic(exp);
Step 4. Add Java code to invoke Notify() operation of the NotificationBroker interface
In this step, you add Java code to the client to add the actual invocation of the service. The example uses the generated proxy to simplify the client code.
// Since the Notify() operation expects an array of NotificationMessages,
// wrap our single message into an array.
NotificationMessage nmArray[] = new NotificationMessage[] { message};
// Create an instance of the generated proxy
NotificationBrokerProxy brokerProxy = new NotificationBrokerProxy();
// Perform the invocation
brokerProxy.notify(nmArray, optionalInformation);
|
Step 5. Run and test the client application, sending events to WebSphere Business Monitor
If you are using the Main.java file provided with this article, be sure to also place a copy of the provided events.xml file in the C:\TEMP directory on your file system.
There are two options for running the producer client application:
- Export the enterprise application project to an EAR file and use the
launchClientcommand to run the application in the client container. - Run the client in the workspace. Select the WSNProducerClient project, then select Run As - Run.
You should verify that the flow of event messages has reached WebSphere Business Monitor. If you used the example events.xml file, and you deployed and configured the MortgageLendingBAM sample that ships with WebSphere Business Monitor 6.1, after you run the producer client application you should be able to launch a WebSphere Business Monitor dashboard and see the instances view updated similar to Figure 5.
Figure 5. Instances view populated from events

In this article, you learned about an additional approach for sending business events to WebSphere Business Monitor. You can employ Web services to emit events when you do not already have your business processes and activities integrated with one of the IBM products enabled to send events to WebSphere Business Monitor.
In Part 14 of this series, learn about applying this approach for .NET environments.
The authors would like to thank Jaime Atiles, Joachim Frank, and David Eads for reviewing this article.
| Description | Name | Size | Download method |
|---|---|---|---|
| Samples for this article | monitor-wsn-downloads.zip | 13KB | HTTP |
Information about download methods
Learn
-
Check out the other parts of this series:
- Part 1, "What's new in WebSphere Business Monitor 6.1" (developerWorks, Dec 2007)
- Part 2, "WebSphere Business Monitor 6.1 installation improvements" (developerWorks, Jan 2008)
- Part 3, "Improved Unit Test Environment in IBM WebSphere Business Monitor Development Toolkit V6.1" (developerWorks, Feb 2008)
- Part 4, "Use the Integrated Test Client to improve iterative development with WebSphere Business Monitor V6.1" (developerWorks, Mar 2008)
- Part 5, "Managing failed and unrecoverable events In IBM WebSphere Business Monitor V6.1" (developerWorks, Apr 2008)
- Part 6, "Combine high-level monitor models from IBM WebSphere Business Modeler with low-level monitor models from IBM WebSphere Integration Developer" (developerWorks, Apr 2008)
- Part 7, "Creating user-defined XPath functions for IBM WebSphere Business Monitor V6.1" (developerWorks, Apr 08)
- Part 8, "Enabling IBM WebSphere Business Monitor V6.1 to receive events from WebSphere MQ" (developerWorks, Apr 08)
- Part 9, "Empowered authoring of monitor models with IBM WebSphere Business Monitor development toolkit for 6.1" (developerWorks, May 08)
- Part 10, "Improved data handling with IBM WebSphere Business Monitor 6.1" (developerWorks, Jun 08)
- Part 11, "Advanced installation of IBM WebSphere Business Monitor 6.1" (developerWorks, Jul 08)
- Part 12, "Diagnosing installation problems with IBM WebSphere Business Monitor V6.1" (developerWorks, Aug 08)
- Part 14, "Publishing event messages to WebSphere Business Monitor V6.1 with WS-Notification: Continued" (developerWorks, Sep 08)
- Browse the
WebSphere Business Monitor 6.1 Information Center
for more details and reference material.
- Get a great introduction to WS-Notification from
"Events and service-oriented architecture: The OASIS Web Services Notification
specifications" (IBM Systems Journal, 2005).
- Read
"WS-Notification
in WebSphere Application Server Version 6.1" (developerWorks, Nov 2006) to understand
how WS-Notification is realized in WebSphere Application Server.
- The IBM Redbook
Business Activity
Monitoring with WebSphere Business Monitor V6.1 has detailed steps for using various
products and technologies for sending events to WebSphere Business Monitor.
-
"Enabling
WebSphere Business Monitor V6.1 to receive events via WebSphere MQ" (developerWorks,
Apr 2008) explores the use of WebSphere MQ as an "on-ramp" to WebSphere Business Monitor.
- Consult the
WebSphere
Application Server 6.1 Information Center
for more details on WS-Notification resources and configuration.
- For more details on WS-Notification
resources and configuration, walk through other scenarios for using
WS-Notification in Chapter 22 of the IBM Redbook
Web Services Handbook for WebSphere Application Server 6.1.
- Browse the
"Jump-start business activity monitoring (BAM) series" (developerWorks)
for a wealth of WebSphere Business Monitor how-to information and samples.
- Browse the
technology bookstore
for books on these and other technical topics.
- In the
Architecture area on developerWorks,
get the resources you need to advance your skills in the architecture
arena.
- Get an
RSS
feed
for the series Put new capabilities of business activity monitoring
(BAM) to work.
Get products and technologies
- Download the official standard specifications from
OASIS WS-Notification Technical Committee.
- Download a sample DB2 emitter from the
WebSphere Business Monitor samples.
- Download
IBM product evaluation versions
and get your hands on application development tools and middleware
products from IBM DB2, Lotus®, Rational,
Tivoli®, and WebSphere.
Discuss
- Get involved in the developerWorks
community by participating in
developerWorks blogs.






