Running the scenario

This example provides scenarios for two activities; request processing and event notification.

Scenario 1: request processing

In the request processing scenario the procurement system informs the eMatrix system that one of the components used in a design is now available. The system sends a business object that represents the updated system component.

Start the Visual test connector

  1. Select Start>Programs>WebSphere Business Integration Adapters>Tools>Visual Test Connector. The connector starts.
  2. In the connector window, select File>Create/Select Profile. The Connector Profile window appears.
  3. If you have not already done so, create a profile that emulates the Port Connector in the profile window, as follows:
  4. If you have already created a profile, select it and click OK.
  5. Once you have a profile, select File>Connect.

Start the adapter for eMatrix

Start the adapter for eMatrix by running this command:

%WBIA%\connectors\eMatrix\start_eMatrix.bat eMatrix wmqi 
-c%SAMPLE_FOLDER%\EmatrixConnector.cfg

You can substitute any combination of alphanumeric characters (starting with a letter) for the value of "wmqi".

Start the eMatrix components

Start the eMatrix Collaboration server. Make sure that the instance of Oracle in which the eMatrix system exists is running. Then open an MQL Command window.

Check the current status in eMatrix

At the MQL command line, type this command:

expand bus 'computer' 'gamer deluxe' 1 select bus 
'attribute[in stock]';

Note that the supersonic sound card is not in stock.

Send a request

To do this, follow these steps.

  1. In the Visual Test Connector, select Edit>Load BO.
  2. Select the file %SAMPLE_FOLDER%\sound_card_update.bo.
  3. Enter any name in the popup window and click OK.
  4. Click Send BO in the upper left-hand corner of the Visual Test Connector. The icon contains one yellow arrow.
    You will see text messages appear in the window containing the adapter for eMatrix. These message indicate that the request is being processed.

Check the updated status in eMatrix

Type the following at the MQL command line:

expand bus 'computer' 'gamer deluxe' 1 select bus 
'attribute[in stock]';

Note that the supersonic sound card is now in stock.

Reset the status in the database

In order to run this scenario again, you must reset the supersonic sound card so that it is not in stock.To do so, run this MQL command:

modify bus 'sound card' 'super sonic' 1 'in stock' false;

Scenario 2: event notification

In this scenario, the computer manufacturer changes the configuration of one of its computer systems. The change will trigger a notification to be forwarded to the procurement system.

  1. Repeat steps 1 through 3 from scenario 1 above.
  2. Follow the steps below.

Update the computer configuration

The computer configuration has changed. The computer manufacturer is adding a network card to the computer. At the MQL command line, run:

connect bus 'computer' 'gamer deluxe' 1 relationship 
'computer to pci component' to 'network card' 'net 
 
connector' 1 slot 3;

Poll the event

Go to the command window containing the adapter for eMatrix. At the bottom of the window, type 'p'. This causes the adapter to poll.

View the event

The adapter will record the new computer configuration and forward it to the procurement system (in this case, the Visual Test Connector).

Look in the window pane on the right of the Visual Test Connector. You will see a line containing the text 'wbi_computer.Update'. This is the new computer configuration represented as a WebSphere business object. You can double-click on it to see its contents.

Reset the computer configuration

To run this scenario again, you must disconnect the eMatrix business objects. To do so, run this command:

disconnect bus 'computer' 'gamer deluxe' 1 relationship 
'computer to pci component' to 'network card' 
 
'net connector' 1;

This completes the installation and testing of the sample scenarios. If you have performed all the steps above successfully, you should have a working sample that enables the adapter for eMatrix.

Copyright IBM Corp. 1997, 2003