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