(V10.0.0.3) Business transaction monitoring
View Details

IBM Knowledge Center

Learn how to monitor business transactions on IBM Integration Bus Version 10.0.0.3
Back To Gallery

Import projects

  • Click Import to import the implementation of a retail solution into your workspace.The solution contains the application BTM_RETAIL_APP and the shared library BTM_RETAIL_SHARED_LIBRARY.
    • Main_Process_Order_Flow.msgflow is the entry point of the application. It routes an incoming message to Order_Item_Request_Flow.msgflow that receives the request.
    • The request is then processed by Order_Item_Despatch_Flow.msgflow. Finally, Order_Item_Response_Flow.msgflow sends a confirmation.
    • Shared library BTM_RETAIL_SHARED_LIBRARY contains the message model used by the solution.
  • All message flows have monitoring events configured on a number of their message nodes.
    For this tutorial, all monitoring events use $Root/XMLNSC/btm_retail/customerNumber as the global correlator. To see an example, open Main_Process_Order_Flow.msgflow, select "Receive Retail Request" node, and click the Monitoring tab in the Properties view.
  • BTM uses these correlators to group together events about the same order coming from different flows.

Create queues

The solution uses WebSphere MQ queues to route messages between the applications.

  1. Create the default IBM Integration Bus queues in WebSphere MQ by completing the following steps:
    1. Open the IBM Integration Console.
    2. In the console window, type the following command:
      server\sample\wmq\iib_createqueues qmgr
      where
      qmgr is the queue manager name.
  2. Create the queues used by the MQ nodes in this tutorial by completing the following steps:
    1. In the console window, type the following command:
      runmqsc qmgr {WorkspacePath}/BTM_RETAIL_APP/create_queues.mqsc
      where
      qmgr is the queue manager name and WorkspacePath is the location of your current Toolkit workspace.
  3. Associate the default integration node with the queue manager by completing the following steps:
    1. In the console window, stop the default integration node by typing the following command:
      mqsistop -i TESTNODE_userid
    2. Associate the queue manager with the default integration node, TESTNODE_userid by typing the following command:
      mqsichangebroker TESTNODE_userid -q qmgr
      where
      qmgr is the queue manager name
    3. Start the default integration node by typing the following command:
      mqsistart TESTNODE_userid

Create database

The solution requires a database to record and store business transaction data.

  1. Open a DB2 command window and run the following command to create the MBRECORD database and monitoring events tables:
    db2 -tvf {IIBInstallDir}/server/ddl/db2/DataCaptureSchema.sql
    where
    IIBInstallDir is the location of the IBM Integration Bus installation.
    Note:To customize the database or schema name used by business transaction monitoring, edit the DataCaptureSchema.sql file before running the command.
  2. In the DB2 command window, run the following command to create the tables for recording and storing business transaction data:
    db2 IIBInstallDir/server/ddl/db2/BusinessCaptureSchema.sql
    Note: If you modified the name of the database in the previous step, you must update the database name in the BusinessCaptureSchema.sql file before you run the command.
  3. Define MBRECORD as the ODBC data source name (DSN) for the database MBRECORD.
    Follow the link Enabling ODBC connections to the databases in the Find out more section below for instructions on configuring an ODBC data source for your operating system.
    Note: If you modified the name of the database in the previous steps, use the same name for your DSN name in this step.
  4. Set a user ID and password for the integration node to use when connecting to the database by completing the following steps:
    1. Open the IBM Integration Console.
    2. In the console window, run the following command:
      mqsisetdbparms TESTNODE_userid -n MBRECORD -u id -p password
      where
      TESTNODE_userid is the default integration node
      id and password are the user ID and password that are used to connect to the MBRECORD database
    3. Optional: Verify the user id and password for the database is set correctly by running the following command:
      mqsireportdbparms TESTNODE_userid -n MBRECORD -u id -p password
  5. Restart the integration node by running the following commands in the console window:
    1. mqsistop TESTNODE_userid
    2. (After the integration node is stopped.) mqsistart TESTNODE_userid
  6. Optional: Test the connection to the database MBRECORD by running the following command in the console window:
    mqsicvp TESTNODE_userid -n MBRECORD

Deploy projects

  1. Drag and drop BTM_RETAIL_SHARED_LIBRARY and BTM_RETAIL_APP onto an integration server of TESTNODE_userid.

Create a business transaction definition

  1. Right-click on TESTNODE_userid in the Integration Nodes view and select Start Web User Interface.
  2. Create a business transaction definition in the web user interface by completing the following steps:
    1. Expand Business -> Business Transactions.
    2. Select Create from the menu to create a new business transaction.
    3. Enter RetailOrderBTD and click OK.
  3. Add message flows to the business transaction definition by completing the following steps:
    1. In the Define tab of RetailOrderBTD, click Add flow to select the message flows that make up this business transaction.
    2. In the "Add message flows" dialog , click Select application, then click the dropdown menu and select BTM_RETAIL_APP.
    3. Click Add to add all the message flows in this application to RetailOrderBTD.
    4. Observe that Main_Process_Order_Flow.msgflow, Order_Item_Request_Flow.msgflow, Order_Item_Despatch_Flow.msgflow and Order_Item_Response_Flow.msgflow are added to the Business Transaction section.
      The warning icon indicates that no start and end events have been defined for this business transaction.
  4. Select the monitoring events that indicate the start, end, and failure of the business transaction definition by completing the following steps in the Business Transaction Event Definitions section:
    1. Expand Main_Process_Order_Flow.msgflow, flag the "Retail request received" event as the Start event.
    2. Expand Order_Item_Request_Flow.msgflow, flag the "Order Item Request Received" event as the Progress event.
    3. Expand Order_Item_Despatch_Flow.msgflow, flag the "Item Despatched" event as the Progress event.
    4. Expand Order_Item_Response_Flow.msgflow, flag the "Confirm Item Ordered" event as the End event.
  5. Save RetailOrderBTD.

Configure the database to be used for the business transaction definition

  1. Select the Configure tab. Note that RetailOrderBTD is not yet configured with a data source.
  2. Click Click here to specify a data source name and select the data source name MBRECORD from the dropdown menu.
  3. Click Save to save the datasource name, and click Resume editing of business transaction RetailOrderBTD to return to the Configure tab.
    Note: MBRecord will be used to record all the business transactions for this integration node.

Start monitoring the message flows

  1. In the web user interface, expand Servers -> server -> Applications -> BTM_RETAIL_APP
    where
    server is the integration server where the BTM_RETAIL_APP application is deployed.
  2. Click the dropdown menu for the BTM_RETAIL_APP application and select Start flow monitoring.

Run Main_Process_Order_Flow in the flow exerciser

  1. In the BTM_RETAIL_APP, open the Main_Process_Order_Flow message flow.
  2. Click the Flow Exerciser icon to start recording the message path through the flow.
  3. Click the Send Message icon to select a message to send to the flow and choose Chocolate Order. Note the "requestType" is "orderItem" and "customerNumber" is "5555". Click Send.
  4. After the response message is received, the message path is highlighted on the message flow. You may click on any connection to see the message that passed through that connection.
  5. Click the Send Message icon again and choose Coffee Order. Note the "requestType" is "orderItem" and "customerNumber" is "5670". Click Send.
  6. Click the Send Message icon again and choose Tea Order. Note the "requestType" is "orderItem" and "customerNumber" is "4785". Click Send.

All 3 transactions were processed by the message flows in BTM_RETAIL_APP and captured by RetailOrderBTD. You can now view the results in the web user interface.

View the instances of RetailOrderBTD

  1. Open the web user interface.
  2. Expand Business -> Business Transactions, select RetailOrderBTD, and then select the View tab.
  3. Click Refresh in the All instsances of RetailOrderBTD section. 3 instances, identified by the global transaction ID "customerNumber", are shown. All instances have the status of "Ended".
  4. Click an instance. The 4 associated events, "Retail request received", "Order Item Request Received", "Item Despatched", "Confirm Item Ordered", and their corresponding details are shown in the Events section.
  5. Optionally, to show only the instances with a specified global transaction ID, or those that have a particular status, click Filter in the All instsances of RetailOrderBTD section to specify the filtering criteria.