Running the Coordinated Request Reply sample

You can run the Coordinated Request Reply sample to perform the following processing:

  1. Convert a WebSphere MQ message with XML payload into one containing the same data but in a CWF format.
  2. Store the initial ReplyToQ and ReplyToQMgr in a WebSphere MQ message for later use.
  3. Run a simulated application to read a WebSphere MQ message with a payload in CWF format, add the current time to the message, and reply using a WebSphere MQ message with a payload in CWF format.
  4. Retrieve the original ReplyToQ and ReplyToQMgr from the WebSphere MQ message created in Step 2 above.
  5. Convert the WebSphere MQ message with payload in CWF format into one containing the same data but in an XML format, and send it as a reply to the original request using the retrieved values for ReplyToQ and ReplyToQMgr.

To run the Coordinated Request Reply sample:

  1. Ensure that the sample message flows and message set have been deployed.
  2. Double click Requester.enqueue in the message flow project into which the sample was imported.
  3. Review the values for Queue manager name and Queue name on the General tab. When using the default queue manager and Message Broker configuration there is no need to change the values but ensure that the Port field contains the value 2414.
  4. Scroll to the bottom of the message data portion of the screen and observe the value for CompletionTime time which is 12:00:00.
  5. Click Write to queue to place a WebSphere MQ message on the input queue of the Request message flow.
  6. Start an instance of the Dequeue application:
    1. On the workbench toolbar, click the arrow on the Get a message from a Queue icon Get a message from a Queue.
    2. On the drop-down menu, click Get Message to invoke the Dequeue Message window.
    3. Enter the names for the queue manager and output node queue that you want. Use values of WBRK6_DEFAULT_QUEUE_MANAGER for the queue manager name and GET_REQREP_OUT for the queue name to work with the default configuration.
    4. Click Read From Queue to read a message from the queue.
    5. Close the window: the next time that you click the arrow on the Get a message from a Queue icon Get a message from a Queue, you see the dequeue configuration that you created above listed on the drop-down menu. Click this file on the menu (or if it is number 1 on the menu, just click the icon itself) to get a message from the queue.
    6. Optional: While the Dequeue Message window is open, you can save a read message into a file in your message flow project to keep it for later. Click the Save As button, and in the Save Message As window, select the flow project and enter a name for the file.
  7. Scroll to the end of the message and observe that the initial CompletionTime value <st1:time hour="0" minute="0">of 12:00:00</st1:time> has been replaced by the current time.  This was done in the Backend Reply message flow and demonstrates that the message was processed in the Backend Reply message flow.

Once you have observed that the value of CompletionTime has been changed to a value other than 12:00:00 you have successfully run the Coordinated Request Reply sample.  Should you run the test at exactly 12:00:00 then rerun just after to ensure that the time in the message is updated in the Backend message flow.

Main Page icon   Back to sample home