Time for action – triggering a fault within the BPEL process

So far, we implemented two <scope> activities that model the book ordering process. However, to trigger <compensationHandler> of the <scope> activities, we need to have either <catch>, <catchAll>, <compensationHandler>, or <terminationHandler>. We will use <catchAll>, and inside this, we will trigger <compensationHandler>. To trigger <catchAll>, we need to throw an explicit fault after the execution of the two scopes. Next, we learn how to throw this fault.

Carry out the following steps:

  1. Add a <sequence> activity named throwFault after the <scope> activity named initiateCreditCardTransaction. Then, drag-and-drop an <if> activity within it and specify its condition, as shown in the following ...

Get WS-BPEL 2.0 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.