Introduction to One-Way Messages

Introduction to Interaction Patterns in a BPEL Process 5-3 Figure 5–2 Synchronous Interaction BPEL Process Service Component as the Client When the BPEL process service component is on the client side of a synchronous transaction, it needs an invoke activity. The port on the client side both sends the request and receives the reply. As with all partner activities, the WSDL file defines the interaction. BPEL Process Service Component as the Service When the BPEL process service component is on the service side of a synchronous transaction, it needs a receive activity to accept the incoming request, and a reply activity to return either the requested information or an error message a fault; f1 in Figure 5–2 defined in the WSDL. For more information about synchronous interactions, see Chapter 7, Invoking a Synchronous Web Service from a BPEL Process.

5.3 Introduction to Asynchronous Interactions

In an asynchronous interaction, a client sends a request to a service and waits until the service replies. Example 5–3 shows the portType and operation part of the BPEL process WSDL file for this environment. Example 5–3 Asynchronous WSDL File . . . wsdl:portType name=BPELProcess1 wsdl:operation name=process wsdl:input message=client:BPELProcess1RequestMessage wsdl:operation wsdl:portType . . . wsdl:portType name=BPELProcess1Callback wsdl:operation name=processResponse wsdl:input message=client:BPELProcess1ResponseMessage wsdl:operation wsdl:portType BPEL Process WSDL Client PartnerLink d1 d2 f1 Call service invoke BPEL Process receive reply OR 5-4 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite Figure 5–3 provides an overview. Figure 5–3 Asynchronous Interaction BPEL Process Service Component as the Client When the BPEL process service component is on the client side of an asynchronous transaction, it needs an invoke activity to send the request and a receive activity to receive the reply. As with all partner activities, the WSDL file defines the interaction. BPEL Process Service Component as the Service As with a synchronous transaction, when the BPEL process service component is on the service side of an asynchronous transaction, it needs a receive activity to accept the incoming request and an invoke activity to return either the requested information or a fault. Note the difference between this and responding from a synchronous BPEL process: a synchronous BPEL process uses a reply activity to respond to the client and an asynchronous service uses an invoke activity. For more information about asynchronous interactions, see Chapter 8, Invoking an Asynchronous Web Service from a BPEL Process.

5.4 Introduction to Asynchronous Interactions with a Timeout

In an asynchronous interaction with a timeout which you perform in BPEL with a pick activity, a client sends a request to a service and waits until it receives a reply, or until a certain time limit is reached, whichever comes first. For example, a client requests a loan offer. If the client does not receive a loan offer reply within a specified amount of time, the request is canceled. Figure 5–4 provides an overview. Client BPEL Process WSDL PartnerLink d2 Service BPEL Process invoke Get response receive receive d1 Call service invoke