Introduction to Asynchronous Interactions

Introduction to Interaction Patterns in a BPEL Process 5-5 Figure 5–4 Asynchronous Interaction with Timeout BPEL Process Service Component as the Client When the BPEL process service component is on the client side of an asynchronous transaction with a timeout, it needs an invoke activity to send the request and a pick activity with two branches: an onMessage branch and an onAlarm branch. If the reply comes after the time limit has expired, the message goes to the dead letter queue. As with all partner activities, the WSDL file defines the interaction. For more information about asynchronous interactions with a timeout, see Section 14.2, Creating a Pick Activity to Select Between Continuing a Process or Waiting. BPEL Process Service Component as the Service The behavior of the BPEL process service component as a service matches the behavior with the asynchronous interaction with the BPEL process service component as the service.

5.5 Introduction to Asynchronous Interactions with a Notification Timer

In an asynchronous interaction with a notification time, a client sends a request to a service and waits for a reply, although a notification is sent after a timer expires. The client continues to wait for the reply from the service even after the timer has expired. Figure 5–5 provides an overview. Wait for callback onMessage Logic Post Callback Logic Post Timeout Time out in 1M onAlarm pick Client BPEL Process WSDL PartnerLink d1 d2 Call service invoke Service BPEL Process receive invoke 5-6 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite Figure 5–5 Asynchronous Interaction with a Notification Time BPEL Process Service Component as the Client When the BPEL process service component is on the client side of this transaction, it needs a scope activity containing an invoke activity to send the request, and a receive activity to accept the reply. The onAlarm handler of the scope activity has a time limit and instructions on what to do when the timer expires. For example, wait 30 minutes, then send a warning indicating that the process is taking longer than expected. As with all partner activities, the WSDL file defines the interaction. BPEL Process Service Component as the Service The behavior for the BPEL process service component as the service matches the behavior with the asynchronous interaction with the BPEL process service component as the service.

5.6 Introduction to One Request, Multiple Responses

In this interaction type, the client sends a single request to a service and receives multiple responses in return. For example, the request can be to order a product online, and the first response can be the estimated delivery time, the second response a payment confirmation, and the third response a notification that the product has shipped. In this example, the number and types of responses are expected. Figure 5–6 provides an overview. BPEL Process WSDL PartnerLink d1 d2 Service BPEL Process receive invoke scope Call service invoke onAlarm Notify Someone Wait for Callback receive