Time for action – waiting for onFault and onEvent callbacks

To wait for the onFault and onEvent callbacks, we will do the following:

  1. Add two additional <onMessage> branches to the <pick> activity. We will achieve this by clicking on the Add OnMessage icon next to the <pick> activity icon. To add two branches, we should click on it twice. We should see the following:
    Time for action – waiting for onFault and onEvent callbacks
  2. We need to configure each <onMessage> branch. The first branch will react on the onFault message. We will specify the following parameters:
    Time for action – waiting for onFault and onEvent callbacks
  3. The second branch will react on the onEvent message. We will specify the following parameters:
    Time for action – waiting for onFault and onEvent callbacks
  4. Next, we will need to specify the activities that should happen in both branches. We have decided to throw a fault in both cases. We should see the following:
    Time for action – waiting for onFault and onEvent callbacks

What just happened?

We have added the <onMessage> branches of the <pick> activity for the OnFault and OnEvent callbacks from the WarehousingConfirmationBPEL service. The following BPEL code has been generated:

What just happened?

Adding an alarm event for callback

To finalize our example, we will add an alarm event to our <pick> activity for the callback from the WarehousingConfirmationBPEL service. We will use a duration expression and limit the time for confirmation to 1 day. Similar to the event handlers earlier in this chapter, we will use an <onAlarm> branch.

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

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