Running the scenarios

This topic contains an overview and procedures for running the scenarios.

Overview of running the scenarios

The tutorial includes a request processing and an event processing scenario. To run the scenarios, you must configure the samples as described in Setting up your environment.

Steps for running the scenarios

To run the scenarios, do the following:

  1. Start the Adapter for WebSphere Business Integration Message Broker if it is not already running. For further information, see Starting the connector.
  2. Start the Visual Test Connector if it is not already running. For further information, see Implementing Adapters with WebSphere Message Brokers.
  3. Start the WebSphere Business Integration Message Broker application broker if not already running.For further information, see Implementing Adapters with WebSphere Message Brokers.
  4. Simulate the Port connector Using Visual Test Connector, define a profile for the Port connector:
    1. Select File->Create/Select Profile from the Visual Test Connector menu, then select File-> New Profile from the Connector Profile menu.
    2. Select the Port Connector configuration file PortConnector.cfg in the sample_folder, then configure the Connector Name and Broker Type and click OK.
    3. Select the profile you created and click OK.
  5. Test the request processing scenario Using Visual Test Connector, create a new instance of a business object and send it:
    1. Create a new instance of business object Sample_WBIMB_LegacyItem_XMLDoc by selecting the business object in the BoType drop-down box and then selecting Create for the BOInstance. This business object is merely an XML wrapper required by the XML data handler; you will need to create a new instance of child-object LegacyItem in your test object to contain actual data. Change the default values if desired
    2. Send the message by clicking Send BO.
  6. Confirm message delivery Using WebSphere MQ Explorer or a similar application, open queue queue://crossworlds.queue.manager/Samples/WBIMB/Item/LegacyApp to see if a new legacy item message with format LI_UP has arrived from the adapter. This indicates a successful delivery of the business object payload as a legacy message via the WebSphere Business Integration Message Broker application. If no message can be found, check in queue queue://crossworlds.queue.manager/Samples/WBIMB/FAIL to see if the message could not be processed by the WebSphere Business Integration Message Broker application. If this is the case, see Implementing Adapters with WebSphere Message Brokers to enable tracing. Then you can determine where the error occurred in the WebSphere Business Integration Message Broker application.
  7. Test the event processing scenario Use utility sample_folder\mqsiput.exe to deliver a legacy item message to the adapter via the WebSphere Business Integration Message Broker application. The mqsiput utility has the following syntax:


    mqsiput [queue] [queue manager] < [message file].


    The sample delivery message LegacyItem.txt resides in the sample_folder directory. For this tutorial, enter


    mqsiput Samples/LegacyApp/Item/WBIMB crossworlds.queue.manager < LegacyItem.txt


    at the command line. If successful, a sample item message is delivered to the WebSphere Business Integration Message Broker application that is simulating a legacy application.

    Note:
    Optionally you may add the loopback message flow to your broker execution group. (This flow is provided with the IBM WebSphere Business Integration Message Broker adapter sample message flows.) Adding the loopback message flow will loop any message sent from the adapter back to the adapter after being processed by the WebSphere Business Integration Message Broker application.
    Once the WebSphere Business Integration Message Broker application delivers a message to the input queue, the adapter retrieves it and attempts to convert it into a Sample_WBIMB_LegacyItem_XMLDoc business object. The key to having the adapter poll the message is to ensure that the message format equals the value associated with the Sample_WBIMB_LegacyItem_XMLDoc business object in meta-object Sample_WBIMB_MO_Config. If it identifies the message format as LI_UP, the adapter then calls the data handler to convert the message to business object Sample_WBIMB_LegacyItem_XMLDoc with verb Update. The newly created business object is subsequently delivered to the WebSphere Business Integration Broker and then re-delivered to the Visual Test Connector.
  8. Confirm message delivery If you've performed all the above steps successfully, you should have a working scenario that enables the WebSphere Business Integration Message Broker adapter to retrieve messages and convert them to Sample_WBIMB_LegacyContact business objects, and to convert Sample_WBIMB_LegacyContact business objects to messages.

Copyright IBM Corp. 1997, 2004