Using the BPEL Designer and Service Engine

When to Use

There are two types of events:


Note –

Event handlers do not interfere with the main flow of the business process. If an event occurs, and an event handler is executed, the main flow will be executed also.


This means, one shouldn't use event handlers, for example, to send replies to requests received in the main fllow, because the main flow might also send a reply which will never be seen by the client, and this can lead to various issues.

On the contrary, a good use-case for event handlers would be to request a business process status. In this case, the activities in the event handler will collect data about the state of the business process, and then reply to the request that triggered the event handler.

Image shows a diagram that illustrates bad and good practices
for using Event Handlers as described in context

This picture can be a bit misleading. The request should be caught by handler itself but not by an internal Receive. I mean that the inbound arrow should come to handler itself, but not to an internal circle, which can be treated like a receive.