Asynchronous invocations and events
Now that we have explained the event handlers, let's look at another useful side of events. In real-world BPEL processes, a BPEL process often makes an asynchronous invocation of partner link services (as we already know from Chapter 5, Interaction Patterns in BPEL, these could be services or other BPEL processes). During an asynchronous invocation, the BPEL process first executes an <invoke>
activity and then waits for the callback using <receive>
.
However, the callback operation might not return a single operation call, such as onResult
. Rather, the BPEL process should be able to wait for more than one callback operation, for example, onResult
, onFault
, and onEvent
.
So far, we have seen how to define an event handler, which waits for incoming events parallel to the execution of the BPEL process flow. However, in scenarios where a BPEL process waits for the callback, using the event handler would make little sense. Therefore, BPEL provides...