Monitoring Common Base Events from WebSphere Partner Gateway V6.2 using WebSphere Business Monitor V6.2

This article shows you how to integrate WebSphere Partner Gateway V6.2 with WebSphere Business Monitor V6.2 using WebSphere MQ. This integration enables business events emitted during document processing and document delivery in WebSphere Partner Gateway to be monitored using the advanced event monitoring capabilities of WebSphere Business Monitor.

Share:

Ms. Sreelatha Sankaranarayanan (sreelathas@in.ibm.com), Software Engineer, WebSphere Adapters Development team, IBM

Photo of Sreelatha SankaranarayananSreelatha Sankaranarayana is a Software Engineer on the WebSphere Adapters Development team at the IBM India Software Lab in Bangalore, and is currently Technical Lead for WebSphere Adapter for Oracle e-Business Suite. Previously, she was part of the WebSphere Partner Gateway and WebSphere Data Interchange Support and Development teams. You can contact Sreelatha at sreelathas@in.ibm.com.



Ms. Rita Wu (ritawu@tw.ibm.com), Software Engineer, IBM

Photo of Rita WuRita Wu joined the WebSphere Partner Gateway Level-2 Support team in June 2006 and works in Taiwan. You can contact Rita at ritawu@tw.ibm.com.



16 February 2011

1. WebSphere Partner Gateway support for Common Event Infrastructure (CEI) and Common Base Event (CBE)

IBM® WebSphere® Partner Gateway V6.2 can be configured so that its events are delivered to an external JMS queue. The configuration steps are described below. WebSphere Partner Gateway events that are delivered to an external queue follow the CBE schema and are called CBEs.

1.1. CBE

CBE is a standard for defining, publishing, and capturing events in enterprise applications. For more information on CBE and the schema, see the Common Base Event specification.

1.2. CBE event structure for WebSphere Partner Gateway events

This section shows a sample CBE generated by WebSphere Partner Gateway. Here is the XML:

Figure 1. Sample CBE event
Sample CBE event

Click to see larger image

Figure 1. Sample CBE event

Sample CBE event

2. Integrating WebSphere Partner Gateway and WebSphere Business Monitor

WebSphere Partner Gateway generates and stores events as a way of monitoring activity inside its system. Events are published to an internal queue from which the WebSphere Partner Gateway event server fetches them. The event server sends them to the internal event store. WebSphere Partner Gateway also supports business activity monitoring by delivering CBE-formatted events on B2B transaction processing to an external JMS queue, where they can be fetched and displayed by a monitoring application.

This article shows you how to integrate WebSphere Partner Gateway and WebSphere Business Monitor for business activity monitoring, and how to enable WebSphere Business Monitor server to receive CBE messages by using WebSphere MQ as the bridge. The article is written for business integration application developers and others who have some prior knowledge of products such as WebSphere Business Monitor, WebSphere Partner Gateway, Rational Application Developer, WebSphere Integration Developer, and WebSphere MQ.

2.1. Overview of WebSphere Partner Gateway

WebSphere Partner Gateway is a business-to-business (B2B) gateway that enables you to establish and maintain a trading community for the secure, automated, cost-effective exchange of business documents between companies and their suppliers. WebSphere Partner Gateway is fully scalable and designed to support the diverse protocol, document-processing, and security requirements of large and small companies. A Web-based graphical user interface makes it easy to enable, configure, and manage trading partner interactions, and to administer the trading community.

You can monitor WebSphere Partner Gateway events by integrating with monitoring products such as WebSphere Business Monitor, and by following a common structure for formatting the published events -- this common structure is CBE-formatted events.

2.2. Overview of WebSphere Business Monitor

WebSphere Business Monitor is a business activity monitoring (BAM) product that provides an up-to-date view of business performance. Personalized business dashboards process business events and data, calculate metrics and key performance indicators (KPIs), and help you identify business problems, correct exceptions, and streamline processes to increase business competitiveness. CBE is the event format that can be consumed by WebSphere Business Monitor models. WebSphere Business Monitor:

  • Captures business-related data specified by your requests from business applications based on the monitor model that you define and install.
  • Extracts measurement variables from the data.
  • Transforms the variables into metric and KPI values.
  • Displays the metrics on your dashboard. Diagrams, for example, show instance diagrams in context in annotated scalable vector graphics. You can define elements to set colors, show and hide data, associate different metric and KPI values, and more.

WebSphere Business Monitor terminology:

Dashboard
A Web page that can contain one or more viewers that graphically represent business data.
KPI
Key performance indicator. A quantifiable measure designed to track one of the critical success factors of a business process.
Instances
A specific construct of data that is processed by WebSphere Business Monitor. WebSphere Business Monitor provides an Instances widget that you can add to a dashboard to display the available monitoring context instances along with specific metrics.
Monitor model
A model that describes the business performance management aspects of a business model, including events, business metrics, and KPIs that are required for real-time business monitoring. You can develop a monitor model using WebSphere Integration Developer or Rational Application Developer, with the WebSphere Business Monitor Toolkit installed.

For detailed information about WebSphere Business Monitor features, see WebSphere Business Monitor information center.

2.3. CBE message flow from WebSphere Partner Gateway to WebSphere Business Monitor

Figure 2 shows a sample flow on integration of WebSphere Partner Gateway with WebSphere Business Monitor through CEI and using WebSphere MQ:

Figure 2. Sample flow
Sample flow

Click to see larger image

Figure 2. Sample flow

Sample flow

Message flow

  1. WebSphere Partner Gateway emits XML-formatted CBE events and delivers the messages to the external WebSphere MQ JMS queue.
  2. WebSphere Business Monitor fetches the CBE event from the MQ queue through the CEI bus.
  3. These messages are transmitted to the WebSphere Business Monitor CEI server, which routes the messages to the appropriate monitor model.
  4. A preconfigured dashboard is used to display the monitored data.

3. Integration topology

The following products are prerequisites for this integration scenario:

  • WebSphere Partner Gateway V6.2
  • WebSphere MQ V6
  • WebSphere Business Monitor V6.2 with a single instance of WebSphere Application Server V6.1
  • DB2 V9.1
  • Rational Application Developer or WebSphere Integration Developer V6.2, with the WebSphere Business Monitor V6.2 Toolkit installed

The following sections will discuss some of these tasks in the development and deployment of the integration scenario:

  • Configuring WebSphere MQ to set up a queue manager, CEI queue, and so forth
  • Configuring WebSphere Partner Gateway to emit CBE events to an external JMS queue (CEIQueue)
  • Enabling the WebSphere Business Monitor server to receive events via WebSphere MQ.
  • Creating a monitor model by using Rational Application Developer or WebSphere Integration Developer (this article uses WebSphere Integration Developer)
  • Deploying the monitor model to the WebSphere Business Monitor server.
  • Defining the monitoring instances on WebSphere Business Space.
  • Routing documents in WebSphere Partner Gateway to emit events.
  • Monitoring the events using Business Space or a CBE browser.

3.1. Setting up WebSphere MQ

Create a queue manager for the external queue (the CEI queue) to which WebSphere Partner Gateway will write the CBEs.

3.2. Configuring WebSphere Business Monitor for CBE monitoring

3.2.1. Verifying accessibility

After installation and setup is complete for WebSphere Partner Gateway and WebSphere Business Monitor, access the following URLs to check if the respective console screens are coming up:

  • WebSphere Partner Gateway Community Console: http://{hostname}:58080/console
  • WebSphere Business Monitor:Integrated Console: http://{host_name}:9062/ibm/console
  • Business Space: http://{host_name}:9081/BusinessSpace
  • Common Business Event browser: http://{host_name}:9062/ibm/console/cbebrowser/events/

3.2.2. Enabling WebSphere Business Monitor server to receive events through WebSphere MQ

To build a messaging infrastructure for WebSphere Business Monitor to rely on, you must bridge WebSphere MQ with the WebSphere Application Server CEI to enable the WebSphere Business Monitor server to receive events via a WebSphere MQ queue manager.

3.2.3.Installing the mediation EAR file MQtoCEIMediation.ear

This section describes how to configure the bridge between WebSphere MQ and the CEI. The mediation application must be installed on the WebSphere Business Monitor server using the integrated console. Use the following steps to install the application on the WebSphere Business Monitor server:

  1. Open the Integrated Solutions Console (Administration Console)
  2. Select Applications => Install new application.
  3. Select Local file system.
  4. Click Browse and browse to {was_root}/scripts.wbm/CEIMQ/MQtoCEIMediation.ear.
    For example: C:\IBM\WBMonitor62\scripts.wbm\CEIMQ\MQtoCEIMediation.ear.
  5. Click Next.
  6. On the Select installation options panel, click Next.
  7. On the Map modules to servers panel, make sure that the server selected for the AddCEIHeaderMediation module is the same one that hosts the CommonEventInfrastructure_Bus bus member, which is listed in the Bus Members as noted earlier.
  8. Click Next.
  9. On the Summary page, click Finish and then click Save to save the changes.
  10. On the Navigation panel, click Applications => Enterprise applications. Verify that the MQtoCEIMediation has been installed. Start up this application if it is not already started.

Figure 3 shows that MQtoCEIMediation has been installed:

Figure 3. MQToCEIMediation installed
MQToCEIMediation installed

3.2.4. Running the configuration script configCEIForMQClients.bat

This script sets up a bridge between WebSphere MQ and the CEI bus, enabling WebSphere MQ to send CBE messages to CEI. Run the provided configuration script to set up the bridge by taking the following steps:

  1. Open a Windows command prompt and change directory to {was_root}/scripts.wbm/CEIMQ.
    For example: C:\IBM\WBMonitor62\scripts.wbm\CEIMQ.
  2. Run configCEIForMQClients.bat:
    Figure 4. Run the configuration script for MQ clients
    Run the configuration script for MQ clients
  3. The script will prompt for interactive input. For each prompt shown in quotes below, enter the parameters as indicated:
    • "Enter the fully qualified hostname of the server or development manager hosting CEI."
      Press Enter to accept the default.
    • "Enter the SOAP port of the server or development manager hosting CEI."
      Press Enter to accept the default.
    • "Enter an administrator or configurator user id."
      Press Enter to indicate that no security enabled.
    • "This configuration utility can connect directly to WebSphere MQ to perform the required configuration, or can produce an MQSC script that you can run manually against the queue manger. Enter connect or script."
      Type connect and press Enter.
    • "Enter a user id for WebSphere MQ administration."
      Press Enter to accept the default (no user id is required).
    • "Enter the name of the administrative channel on the queue manager."
      Press Enter to accept the default (SYSTEM.ADMIN.SVRCONN).
    • "Enter a name of the WebSphere MQ queue manager you want to connect to CEI."
      Type your queue manager name and press Enter.
    • "Enter the fully qualified hostname of the queue manager."
      Type the host name of your queue manager and press Enter.
    • "Enter the port to be used for communications to the queue manager."
      Press Enter to accept the default (1414).
Figure 5. Queues created for integration with WebSphere Business Monitor
Queues created for integration with WebSphere Business Monitor

3.3. Configuring WebSphere Partner Gateway for CBE delivery

This section shows you how to configure WebSphere Partner Gateway to deliver events to an external queue on WebSphere MQ:

  1. Using the WebSphere Partner Gateway console, select System Administration => DocMgr Administration => Event Engine => External Events.
  2. Click the Edit icon and select Enable event delivery to activate event publishing.
  3. Provide the values required to connect to the external queue and click Save.
Figure 6. Sample of configured External Events page
Sample of configured External Events page

3.4. Creating a monitor model

A monitor model is necessary to view the CBE events published by any application in WebSphere Business Monitor. You can use WebSphere Integration Developer V6.2 to create such a monitor model. Since this article uses WebSphere Business Monitor V6.2, you need to create a monitor model that matches this version, and therefore WebSphere Integration Developer V6.2 is used. To create a monitor model:

  1. Start WebSphere Integration Developer and go to the Business Monitoring perspective.
  2. Select File => New => Others. In the dialog window, select Business Monitor => Business Monitoring Project, and continue. This will create a new Business Monitoring Project.
  3. To create a new monitor model, right-click on the WebSphere Business Monitor project and select New => Monitor Model. Then enter a name for the file and click Finish. A new Monitor Model Editor opens, and you will see a new monitor model containing a monitoring context and key. The model may show some errors because creation is not complete.
  4. In the Monitor Model created for WebSphere Partner Gateway, right click on Event definitions and click Import to import the CBE event definitions for WebSphere Partner Gateway events. This schema is provided in extracted folders of the WebSphere Partner Gateway installer, under \Integration\CBESchemas.
  5. The next step is to define an inbound event, for which you will need the event definitions for the events you intend to monitor. To define an inbound event to deliver information to monitor model, right-click the monitoring context and select New => Inbound event. Provide details on the inbound event -- for more information, see Installing and removing the WebSphere Business Monitor Development Toolkit in the WebSphere Business Monitor information center.
    Figure 7. Create monitor model
    Create monitor model
  6. After the monitor model has been created, the next step is to generate a monitor J2EE project: Right-click on the monitor model in the Project Explorer view, and click Generate Monitor J2EE Projects. Switch to the J2EE perspective, where you can view the generated J2EE projects.

To install the monitor model in a production environment:

  1. From the main menu bar, select File => Export. Expand Java EE and click EAR file, then click Next.
  2. Select the EAR application corresponding to your monitor model.
  3. Click Browse to select the destination directory, and enter a name for the EAR file. Click Finish. You can now deploy this EAR file as a monitor model, using the WebSphere Application Server Administrative Console.
    Figure 8. Deploy monitor model 1
    Deploy monitor model 1
    Figure 9. Deploy monitor model 2
    Deploy monitor model 2

4. Monitoring WebSphere Partner Gateway events in WebSphere Business Monitor

4.1. Configuring WebSphere Partner Gateway to route documents

Routing documents in WebSphere Partner Gateway involves publishing events at various stages of document processing and delivery. By enabling external event delivery in WebSphere Partner Gateway, you are instructing it to publish these events as CBE events to an external queue, where they can be monitored by using WebSphere Business Monitor and the CBE Browser, or by using the Business Space dashboard. Both methods are described below.

4.2. Browsing CBEs from the CBE Browser

You can use the CBE Browser to verify that the events were emitted and received by the CEI server. After installing the CBE Browser as described in the Appendix below, you can browse WebSphere Partner Gateway events using the URL http://{host_name}:{WC_adminhost port}/ibm/console/cbebrowser/events/.
For example: http://mytest:9062/ibm/console/cbebrowser/events/.

Figure 10. List of events in CBE Browser
List of events in CBE Browser

Select one of the events in the list to show the event details, as shown below:

Figure 11. CBE browser event details 1
CBE browser event details 1
Figure 12. CBE browser event details 2
CBE browser event details 2
Figure 13. CBE browser event details 3
CBE browser event details 3
Figure 14. CBE browser event details 4
CBE browser event details 4
Figure 15. CBE browser event details 5
CBE browser event details 5

4.3. Viewing instances on WebSphere Business Monitor Business Space

You can use Business Space to configure instances for viewing CBE events published by WebSphere Partner Gateway. Configuring Business Space, and defining KPIs and instances is not described in this article. Here are some WebSphere Partner Gateway events viewed using the Business Space Dashboard:

Figure 16. Business Space event list
Business Space event list

Appendix. Installing the WebSphere Business Monitor CBE Browser

To verify the business activity monitoring result, the WebSphere Business Monitor dashboard is recommended. Alternatively, during the development process, you can install the CBE Browser that is supplied with WebSphere Business Monitor. The CBE Browser is a Web-based tool that helps you verify that CBE events have been created and sent to the server. To install the CBE Browser binary files:

  1. From a command prompt window, enter the file path to access the WBM_profile_root/bin directory.
    For example: cd C:\IBM\WBMonitor62\profiles\WBMon01\bin.
  2. Run the following script: wsadmin -conntype none -lang jython. The following messages are displayed:
    WASX7357I: By request, this scripting client is not connected to any server process. 
    Certain configuration and application operations will be available in local mode.
    WASX7031I: For help, enter: "print Help.help()"
  3. From the wsadmin command line prompt, enter the following command:
    AdminApp.install('monitor_root\systemApps\cbebrowser.ear', 
    '[-appname cbebrowser -node node_name -server server_name]')

    For example:
    AdminApp.install('C:\IBM\WBMonitor62\MonServer\systemApps\cbebrowser.ear', 
    '[-appname cbebrowser -node mytestNode01 -server server1]')

    The following messages are displayed:
    ADMA5016I: Installation of cbebrowser started.
    ADMA5005I: The application cbebrowser is configured in 
         the WebSphere Application Server repository.
    ADMA5011I: The cleanup of the temp directory for application cbebrowser is complete.
    ADMA5013I: Application cbebrowser installed successfully.
    Important: When installing the Common Base Events browser into a network deployment environment, the files must be installed on the deployment manager node.
  4. Save the configuration, enter the following command in the wsadmin command line prompt: AdminConfig.save() After the binary files deployment, go to the WebSphere Application Server administrative console, to enable the event data store. For production, to use the CEI event service with WebSphere Business Monitor, use the steps below to disable the CEI event datastore because it has an impact on the performance of the CEI event service:
    • From the Navigation panel, select Service Integration => CEI => Event Service, and then under the Additional Properties section, click Event Services.
    • Select your event service.
    • Ensure that the Enable event data store check box is checked:
      Figure 17. Enable event data store
      Enable event data store
    • Click OK and save the changes.
    • Restart WebSphere Application Server.
    • Open a Web browser and access the following URL:
      http://{host_name}:{WC_adminhost port}/ibm/console/cbebrowser/events/
      For example: http://mytest:9062/ibm/console/cbebrowser/events/
      Figure 18. CBE Browser Get Events
      CBE Browser Get Events

Resources

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Business process management on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Business process management, WebSphere, Industries
ArticleID=627528
ArticleTitle=Monitoring Common Base Events from WebSphere Partner Gateway V6.2 using WebSphere Business Monitor V6.2
publish-date=02162011