Before you run the scenarios:
- Start the adapter for iSoft if it is not already
running.
- For Windows:
- Double-click on sample_folder\START ISOFT CONNECTOR
- For UNIX:
- Execute connector_manager_ISoft -start from the command
line. Update the permissions of this file as needed. Make sure
that the file is in your execution PATH.
- Start the Visual Test Connector if it is not already
running.
- Click File->Create/Select Profile. A new window pops up.
If it's the first time executing the sample, then click File->New
Profile.
- Select PortConnector.cfg from the
sample_folder directory.
- Set the Connector Name field to
PortConnector.
- Set the Broker Type name to WMQI.
- Select PortConnector from the list.
- Click OK.
- Click File->Connect.
- Start iSoft components
- Copy an instance of the iSoft Peer-to-Peer Agent to the
sample_folder\p2pagent
- Open three instances of the iSoft Peer-to-Peer Agent.
- In the first window enter the following:
batch p2pagent.cfg_a
This instance will be referred to as P2pagent A
- In the second window, enter the following:
batch p2pagent.cfg_b
This instance will now be referred to as P2pagent B
- In the third window, enter the following:
batch p2pagent.cfg_c
This instance will now be referred to as P2pagent C
This part of the tutorial describes a request processing scenario.
- Load the business object
- 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.
- 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.
- Send the business object to trading partner B
- 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.
- 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.
- Send the business object to trading partner C
- Edit the business object instance A_send. Set the value
of MOConfig.JMSProperties.receiverid to
C.
- Click the Send Bo button.
- 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.
- Confirm message delivery
- Check the file system. There should be new files in
sample_folder\p2pagent\inboxB\fromA and
sample_folder\p2pagent\inboxC\fromA.
- New messages should exist in the COMPA.RECEIPTS and
COMPA.NOTICES queues.
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
- Process incoming trading partner messages
- 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.
- 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
- Confirm message arrival
- Using MQSeries Explorer or a similar application, open queue
queue://isoft.queue.manager/COMPA.XML to
see if a new message has arrived from P2pagent B.
- Poll for the message
- Go to the iSoft adapter window, enter p, and hit return.
Alternatively, you can set up the adapter to poll for messages at a specified
interval by setting the PollFrequency iSoft Connector property. The
adapter is polling the COMPA.XML,
COMPA.NOTICES, and COMPA.RECEIPTS
queues. A message is added to the COMPA.NOTICES queue
every time P2pagent A performs an action. When P2pagent A receives an
MDN (message receipt) it deposits the receipt in the COMPA.RECEIPTS
queue. Assuming that you executed all of the previous steps (including
those in Request processing scenario), each of these queues should contain at least one message
prior to polling.
- Check the Test Connector for the processed objects
- 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
- Double click each object to inspect it.
- 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.
