bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

BPM - Workshop Interoperability Sample

BPM-Workshop Interoperability Process

The section contains the steps necessary to complete the interoperability process and a description of messages exchanged in the WebLogic Integration BPM - Workshop Interoperability Sample.

Running the Sample

To run the sample, take the following steps:

1. In the Worklist, select BPMWLW from the Organization drop-list, as shown in Figure 3-1.

   Figure 3-1 Selecting the Organization in the Worklist

2. From the Workflow menu, select Start a Workflow. The Start Workflow window opens, as shown in Figure 3-2.

   Figure 3-2 Starting Workflow

3. Make sure that the selected organization is the BPMWLW.

4. Select the SendPO workflow and click OK. A message box appears indicating that the workflow has started.

5. In the message box, select OK.

   After you start the SendPO workflow in the Worklist, the workflow sends a PO XML message to the jws.queue JMS queue with one of the following URIs:

   - SOAP over HTTP: wlw_bpm_soap/bpm2wlw/BPM2WLW.jws.

   - XML over HTTP: wlw_bpm_xml/bpm2wlw/BPM2WLW.jws

   In the SOAP over HTTP sample, the SendPO Web service receives the PO, and then fires its purchase method. The purchase method calls the WLW2BPMControl.sendXMLrequest method, which in turn calls the BPMControl.sendXMLrequest method. The BPMControl.sendXMLEvent method call places the PO on the com.bea.wli.bpm.EventQueue JMS queue.

   In the XML over HTTP sample, the SendPO Web service receives the PO, and then fires its sendXMLEvent method. The BPM2WLW.sendXMLEvent method calls the WLW2BPMControl.onXMLEvent method, which in turn calls the BPMControl.sendXMLEvent method. The BPMControl.sendXMLEvent method call places the PO on the com.bea.wli.bpm.EventQueue JMS queue.

   Next, the ProcessPO workflow Start node retrieves the PO from the queue and extracts its contents into variables. The ProcessPO workflow Approve PO node assigns a task to the wlisystem user, and waits for the user to execute the task in the Worklist, as shown in Figure 3-3.

   Figure 3-3 Approve PO Workflow Node Assigns the User a Task

6. To execute the task, double-click the Approve PO task. The Approve PO node opens a window asking you to approve the PO, as shown in Figure 3-4.

   Figure 3-4 Approve PO Window

7. Click Yes to approve the task. The callback action for the question causes the Approve PO node to be marked as done.

   In the SOAP over HTTP sample, the following takes place:

   The workflow proceeds to the Ack PO node, which sends a POAck XML message to the com.bea.wli.bpm.WLWResponseQueue. The BPMControl JMS control in the WLW2BPM Web service retrieves the POAck message from the queue and triggers the BPM_onXMLresponse callback handler in the WLW2BPM Web service. The callback handler invokes the onXMLresponse handler, which posts the POAck message to the com.bea.wli.bpm.EventQueue JMS queue.

   In the SendPO workflow, the Get PO Ack node retrieves the POAck message and allows the execution to proceed to the Notify PO Ack node, which assigns the Notify PO Ack task to the Worklist, as shown in Figure 3-5.

   In the XML over HTTP sample, the following takes place:

   The workflow proceeds to the Ack PO node, which sends a POAck XML message to the jws.queue. Note that the POAck XML message tags the instance ID of the SendPO workflow into the payload of the message. The message also carries the header "URI" which points to wlw_bpm_xml/wlw2bpm/WLW2BPM.jws. This ensures the WLW2BPM Web service is invoked by the POAck XML message.

   The WLW2BPM Web service retrieves the POAck message from the queue and triggers the WLW2BPM.sendPOAck method. The WLW2BPM.sendPOAcl method calls the BPM2WLW control's sendPOAck method passing in the PO number.

   The sendPOAck method transmits the raw XML message over HTTP to the BPM2WLW Web service. The BPM2WLW Web service, on receiving the acknowledgement, posts the POAck message to the com.bea.wli.bpm.EventQueue JMS queue.

   The SendPO workflow has an event key that looks for the instance ID in the POAck message payload. When an event with the key-value expression that contains the instance ID arrives on the event queue, the instance triggers the Get PO Ack node. This results in the retrieval of the POAck message and allows the execution to proceed to the Notify PO Ack node, which assigns the Notify PO Ack task to the Worklist, as shown in Figure 3-5.

   Figure 3-5 The Notify PO Ack Workflow Node Assigns the User a Task

8. Double-click the Notify PO Ack task to execute the task. The task disappears from the Worklist and execution proceeds to the Stop node. This terminates the sample.

9. To view the messages passed between the Web services, use the following URLs:

   - SOAP over HTTP:

   >     http://localhost:7501/wlw_bpm_soap/wlw2bpm/WLW2BPM.jws?.EXPLORE=.TEST

   >     http://localhost:7501/wlw_bpm_soap/bpm2wlw/BPM2WLW.jws?.EXPLORE=.TEST

   - XML over HTTP:

   >     http://localhost:7501/wlw_bpm_xml/wlw2bpm/WLW2BPM.jws?.EXPLORE=.TEST

   >     http://localhost:7501/wlw_bpm_xml/bpm2wlw/BPM2WLW.jws?.EXPLORE=.TEST

   Note: If the Message Log is empty, click Refresh in the Message Log section of the Web services page.

10. To view the messages, click the messages in the Message Log.

    The following figures show the messages:

    Figure 3-6 Send PO Web Service Message Log—SOAP over HTTP

    Figure 3-7 Process PO Web Service Message Log—SOAP over HTTP

    Figure 3-8 Send PO Web Service Message Log—XML over HTTP

    Figure 3-9 Send PO Web Service Message Log—XML over HTTP