Introduction to Asynchronous Interactions with a Notification Timer

Introduction to Interaction Patterns in a BPEL Process 5-7 Figure 5–6 One Request, Multiple Responses BPEL Process Service Component as the Client When the BPEL process service component is on the client side of this transaction, it needs an invoke activity to send the request, and a sequence activity with three receive activities, one for each reply. As with all partner activities, the WSDL file defines the interaction. BPEL Process Service Component as the Service The BPEL service needs a receive activity to accept the message from the client, and a sequence attribute with three invoke activities, one for each reply.

5.7 Introduction to One Request, One of Two Possible Responses

In an interaction using one request and one of two possible responses, the client sends a single request to a service and receives one of two possible responses. For example, the request can be to order a product online, and the first response can be either an in-stock message or an out-of-stock message. Figure 5–7 provides an overview. Client BPEL Process Call service invoke sequence receive receive d1 d3 d2 d4 receive Service BPEL Process receive sequence sequence sequence invoke invoke invoke WSDL Client PartnerLink 5-8 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite Figure 5–7 One Request, One of Two Possible Responses BPEL Process Service Component as the Client When the BPEL process service component is on the client side of this transaction, it needs the following: ■ An invoke activity to send the request ■ A pick activity with two branches: one onMessage for the in-stock response and instructions on what to do if an in-stock message is received ■ A second onMessage for the out-of-stock response and instructions on what to do if an out-of-stock message is received As with all partner activities, the WSDL file defines the interaction. For more information about interactions using one request and one of two possible responses, see Section 14.2, Creating a Pick Activity to Select Between Continuing a Process or Waiting. BPEL Process Service Component as the Service The BPEL service needs a receive activity to accept the message from the client, and a switch activity with two branches, one with an invoke activity sending the in-stock message if the item is available, and a second branch with an invoke activity sending the out-of-stock message if the item is not available.

5.8 Introduction to One Request, a Mandatory Response, and an Optional Response

In this type of interaction, the client sends a single request to a service and receives one or two responses. Here, the request is to order a product online. If the product is delayed, the service sends a message letting the customer know. In any case, the service always sends a notification when the item ships. Figure 5–8 provides an overview. onMessage A Logic A Logic B onMessage B pick Client BPEL Process WSDL PartnerLink d1 Call service invoke Service BPEL Process Item in stock? invoke Msg A invoke Msg B otherwise switch receive Msg A or Msg B