Running the scenarios

Before you run the scenarios:

  1. Start the adapter for iSoft if it is not already running.
  2. Start the Visual Test Connector if it is not already running.
    1. Click File->Create/Select Profile. A new window pops up. If it's the first time executing the sample, then click File->New Profile.
    2. Select PortConnector.cfg from the sample_folder directory.
    3. Set the Connector Name field to PortConnector.
    4. Set the Broker Type name to WMQI.
    5. Select PortConnector from the list.
    6. Click OK.
    7. Click File->Connect.
  3. Start iSoft components
    1. Copy an instance of the iSoft Peer-to-Peer Agent to the sample_folder\p2pagent
    2. Open three instances of the iSoft Peer-to-Peer Agent.
    3. In the first window enter the following:
      batch p2pagent.cfg_a
      

      This instance will be referred to as P2pagent A

    4. In the second window, enter the following:
        batch p2pagent.cfg_b
      

      This instance will now be referred to as P2pagent B

    5. In the third window, enter the following:
       batch p2pagent.cfg_c
      

      This instance will now be referred to as P2pagent C

Request processing scenario

This part of the tutorial describes a request processing scenario.

  1. Load the business object
    1. Using the Test Connector, load a copy of Company_A_Fruit_Catalog_with_dynamic_mo.BO by selecting Edit->Load BO. If the Load BO menu option is unfocused, click in the left grid pane and try selecting Edit->Load BO again.
    2. When you are prompted for a name, enter A_send. Examine the business object, expanding its child objects. Notice that when you expand JMSProperties the attribute receiverid has the value B. This information is included in the RFH2 header. It tells the iSoft Peer-to-Peer Agent to forward the message to a trading partner named B.
  2. Send the business object to trading partner B
    1. Click the Send BO button. This posts a message to the COMPA.OUT queue. P2pagent A must now get the message and send it to its trading partner.
    2. In the P2pagent A window, enter the following:
      send http MAILBOX MAILBOX -de -dsMAILBOXID=COMPA.OUT -r
      

      Alternatively, to start a persistent send command that continually polls the queue every 5 seconds until April 15th 2003 invoke the following command

      send http MAILBOX MAILBOX -de -dsMAILBOXID=COMPA.OUT -r 
      -tC5s -tE20030415000000
      

    After performing a successful send you'll notice that both the P2pagent A and P2pagent B windows contain new log messages.

  3. Send the business object to trading partner C
    1. Edit the business object instance A_send. Set the value of MOConfig.JMSProperties.receiverid to C.
    2. Click the Send Bo button.
    3. In the P2pagent A window, enter the following:
      send http MAILBOX MAILBOX -de -dsMAILBOXID=COMPA.OUT -r
      

    The message is delivered to trading partner C.

  4. Confirm message delivery
    1. Check the file system. There should be new files in sample_folder\p2pagent\inboxB\fromA and sample_folder\p2pagent\inboxC\fromA.
    2. New messages should exist in the COMPA.RECEIPTS and COMPA.NOTICES queues.

Event notification scenario

In the following scenario Trading Partner B sends an order to Trading Partner A. The iSoft Peer-to-Peer Agent has the ability to route messages to different queues based on a messages MIME type. In this scenario you create messages with a text/xml MIME type. The addroute commands in p2pagent.cfg_a route these messages to the COMPA.XML queue. P2pagent A could also route any messages with a MIME type set to text/plain to COMPA.TXT. You can configure the connector to poll these queues and configure data handlers to process the MQ messages on a per queue basis. An XML data handler could process all messages on a specific queue (such asCOMPA.XML). The delimited data handler could process all messages on another queue (for example, COMPA.TXT). The following sample demonstrates polling XML messages only

  1. Process incoming trading partner messages
    1. Invoke the following send command in P2pagent B.
      send http B A -cX -fNoutboxB\toA\Order1.txt
      

      This command gets a file from the file system and transports it from P2pagent B to P2pagent A. P2pagent A puts the message in the COMPA.XML queue.

    2. Alternatively, to send information to P2pagent A and deposit it in the COMPA.TXT queue, you could have entered the following command:
      send http B A -cT -fNoutboxB\toA\Order1.txt
      
  2. Confirm message arrival
  3. Poll for the message
  4. Check the Test Connector for the processed objects
    1. You should see three objects in the right hand pane:
      • a Sample_ISoft_Notification object
      • a Sample_ISoft_MDN object
      • a Sample_ISoft_Order object
    2. Double click each object to inspect it.
    3. Select each object separately and click the Reply Success button.

    Note:
    Be sure to click Reply Success or Reply Fail for each object before shutting down the connector.

If you have performed all the above steps successfully, you should have a working sample scenario that enables the iSoft adapter to send and receive messages from the iSoft Peer-to-Peer Agent.

Copyright IBM Corp. 1997, 2003