Introduction to BPEL Process Monitors

5-2 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite Figure 5–1 One-Way Message BPEL Process Service Component as the Client As the client, the BPEL process service component needs a valid partner link and an invoke activity with the target service and the message. As with all partner activities, the Web Services Description Language WSDL file defines the interaction. BPEL Process Service Component as the Service To accept a message from the client, the BPEL process service component needs a receive activity.

5.2 Introduction to Synchronous Interactions

In a synchronous interaction, a client sends a request to a service d1 in Figure 5–2 , and receives an immediate reply d2 in Figure 5–2 . A BPEL process service component can be at either end of this interaction, and must be coded based on its role as either the client or the service. For example, a user requests a subscription to an online newspaper and immediately receives email confirmation that their request has been accepted. Example 5–2 shows the portType and operation part of the BPEL process WSDL file for this environment. Example 5–2 Synchronous WSDL File . . . wsdl:portType name=BPELProcess1 wsdl:operation name=process wsdl:input message=client:BPELProcess1RequestMessage wsdl:output message=client:BPELProcess1ResponseMessage wsdl:operation wsdl:portType Figure 5–2 provides an overview. Client BPEL Process WSDL PartnerLink Service BPEL Process receive d1 invoke 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