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 instances of icsmqd and icssvr to the
sample_folder\icssvr directory
- Set the following environment variables:
P2PMBSERVER_INPUTURI=http://127.0.0.1:3081
P2PMBSERVER_MBNAME=wbia.queue.manager
These variables will be read by the iSoft WebSphere MQ driver
(icsmqd) when it is started. If
wbia.queue.manager is not the name of your queue
manager, substitute your queue manager's name.
- Start one instance of the iSoft WebSphere MQ driver.
- Open three instances of the iSoft Commerce Suite server.
- In the first window enter the following:
batch icssvr.cfg_a
This instance will be referred to as Commerce Server A
- In the second window, enter the following:
batch icssvr.cfg_b
This instance will now be referred to as Commerce Server B
- In the third window, enter the following:
batch icssvr.cfg_c
This instance will now be referred to as Commerce Server 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 Commerce Suite server 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. Commerce Server A must now get the
message and send it to its trading partner.
- In the Commerce Server 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
Commerce Server A and Commerce Server 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 Commerce Server 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\icssvr\inboxB\fromA and
sample_folder\icssvr\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 Commerce Suite server 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 icssvr.cfg_a route these
messages to the COMPA.XML queue. Commerce Server 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 Commerce Server B.
send http B A -cX -fNoutboxB\toA\Order1.txt
This command gets a file from the file system and transports it from
Commerce Server B to Commerce Server A. Commerce Server A puts the
message in the COMPA.XML queue.
- Alternatively, to send information to Commerce Server 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://wbia.queue.manager/COMPA.XML to
see if a new message has arrived from Commerce Server 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 Commerce Server A performs an action. When Commerce Server 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 Commerce Suite server.
