Time for action – waiting for callback

To wait for the callback using the <pick> activity, we will do the following:

  1. Add the <pick> activity by dragging-and-dropping it to the BookWarehousingBPEL process. Place it immediately after the <invoke> activity within the WarehousingConfirmationInvocation scope. We should see the <pick> activity with a single OnMessage branch:
    Time for action – waiting for callback
  2. Double-clicking on the OnMessage icon opens the dialog box, where we need to specify the Partner Link, Port Type, and Operation:
    Time for action – waiting for callback
  3. Similarly, we will create the variable on the fly, using the green plus sign icon. We will create a local OnMessage_onResult variable:
    Time for action – waiting for callback
  4. To handle the response, we will place an <if> activity within the OnMessage scope. Within the <if> activity, we will check whether the books have been successfully warehoused. The corresponding XPath condition should look as follows:
    Time for action – waiting for callback
  5. For each branch, we will use an <assign>, where we will assign a successful or unsuccessful warehousing to outputVariable.
    Time for action – waiting for callback

What just happened?

We have added the <pick> activity to wait for the onResult callback operation invocation from the WarehousingConfirmationBPEL service. The following BPEL code has been generated:

What just happened?

Waiting for onFault and onEvent callbacks

So far, we have specified the <onMessage> part of the <pick> activity for the onResult callback. We need to add the onFault and onEvent branches as well. We will proceed in a similar way as we did earlier.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset