Double-click the receive activity and change its name to receive_invoke.

Invoking an Asynchronous Web Service from a BPEL Process 8-7 plnk:portType name=client:LoanService plnk:role plnk:role name=LoanServiceRequester plnk:portType name=client:LoanServiceCallback plnk:role plnk:partnerLinkType Two port types are combined into this single asynchronous BPEL process service component: portType=services:LoanService of the invoke activity and portType=services:LoanServiceCallback of the receive activity. Port types are essentially a collection of operations to be performed. For this BPEL process service component, there are two operations to perform: initiate in the invoke activity and onResult in the receive activity.

8.2.2.3 Partner Links Section in the BPEL File

To call the service from BPEL, you use the BPEL file to define how the process interfaces with the web service. View the partnerLinks section. The services with which a process interacts are designed as partner links. Each partner link is characterized by a partnerLinkType. Each partner link is named. This name is used for all service interactions through that partner link. This is critical in correlating responses to different partner links for simultaneous requests of the same type. Asynchronous processes use a second partner link for the callback to the client. In this example, the second partner link, LoanService, is used by the loan application approver web service. Example 8–3 provides an example. Example 8–3 partnerLink Definition -- This process invokes the asynchronous LoanService. -- partnerLink name=LoanService partnerLinkType=services:LoanService myRole=LoanServiceRequester partnerRole=LoanServiceProvider partnerLinks The attribute myRole indicates the role of the client. The attribute partnerRole role indicates the role of the partner in this conversation. Each partnerLinkType has a myRole and partnerRole attribute in asynchronous processes.

8.2.2.4 Composite Application File

In the composite.xml file, the loan application approver web service appears, as shown in Example 8–4 . Example 8–4 Loan Application Approver Web Service component name=LoanBroker implementation.bpel process=LoanBroker.bpel component For more information, see Section 8.2.1.1, Adding a Partner Link for an Asynchronous Service for instructions on creating a partner link.