Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 TIBCO ActiveMatrix BusinessWorks BPEL Extension Tutorial : Configuring the Service

Configuring the Service
The mortgage broker service is defined by the tutorial/MortgageBroker/BrokerService resource. This resource provides the configuration for the mortgage broker interface, the endpoint that exposes the service to the public, the orchestration process that provides the implementation for the service’s operation, and the bindings to the specific partner services used by the mortgage broker service.
Creating the Partner Link Configuration
The tutorial/MortgageBroker/Partner Link Configuration resource specifies the relationship between named partners and actual partner endpoints. This resource allows you to change partner endpoints or select different partners without changing your orchestration process implementation. Figure 11 illustrates the Partner Link Configuration resource for this tutorial.
Figure 11 Tutorial Partner Link Configuration resource
In this tutorial, there are three potential third-party partner services, Bank_A, Bank_B, and Bank_C. The partner services are defined in the Partner Links field. The Partner Links have already been created, but you must specify the service endpoint for each partner link to complete the configuration. Perform the following procedure to complete the configuration:
1.
2.
Click the Browse button on the right side of the field to obtain a list of potential service endpoints.
3.
The Select a Service Endpoint dialog appears so that you can select the WSDL file that contains the concrete service bindings of this partner. For example, for the Bank_A partner, the endpoint is tutorial/MortgageBroker/PartnerWSDLs/Bank_A_WSDLConcrete/BankPTEndpoint2.
4.
Click OK to dismiss the Select a Service Endpoint dialog once you have selected the endpoint.
5.
Repeat step 1 through step 4 for the Bank_B and Bank_C partner link rows.
6.
Click Apply to apply the changes to the Configuration tab.
The LoanRequestProcess defined a BankService as the requested service. The Service resource allows you to specify which partner in the Partner Link Configuration will fill the role of the BankService in the orchestration process.
Endpoint Connection Resource
The mortgage broker service is exposed to the public through an HTTP endpoint that requires an HTTP Connection resource. The tutorial/MortgageBroker/BrokerServiceHTTPConnection defines the host and port on which this service is offered. In this example, the host is the host machine where the project executes, and the port is 9090.
This resource will be later referenced by the Endpoint Bindings tab in the Service resource described in Configuring the Service Resource.
Configuring the Service Resource
The tutorial/MortgageBroker/BrokerService resource is the service a user invokes to request a loan. The Service has one interface, defined in the tutorial/MortgageBroker/BrokerWSDL file (see Mortgage Broker WSDL). The service has already been created an partially configured. This section describes the remaining configuration steps.
Specifying the Operation Implementation
The BrokerService has one operation, requestLoanOperation. We created the orchestration process that implements this operation in Configuring the Orchestration Process. The service resource associates operations with processes that implement the operations on the Operations tab. All operations are listed in a table, and you use the Browse button in the Operation Implementation column to select the orchestration process that implements the operation. In this example, the LoanRequestProcess implements the requestLoanOperation.
Select tutorial/MortgageBroker/LoanRequestProcess/Broker as the implementation of requestLoanOperation as illustrated in Figure 12.
Figure 12 Specifying an operation implementation
Specifying the Endpoint Bindings
A service exposes its operations to users and other services through endpoints. Endpoints are concrete bindings to physical locations, such as an HTTP port on a web server. In this example, two endpoints have already been created for the service.
The first endpoint is local. Local endpoints are available only to resources within the same project. We will use a TIBCO ActiveMatrix BusinessWorks process definition to invoke this service by way of the local endpoint.
The second endpoint is available by way of the SOAP protocol. This endpoint would be used by client applications or other services to invoke the service over the network. For this type of endpoint, we must also specify the transport on the Transport sub-tab (described in Endpoint Connection Resource), and any other SOAP options on the SOAP Details tab.
Figure 13 illustrates the Endpoint Bindings tab.
Figure 13 Specifying endpoint bindings
Specifying the Partner Bindings
The Partner Binding tab of the service is automatically populated by any partners defined in the orchestration processes used by the service. In this example, there is one partner named BankService. The Partner Binding tab allows you to bind the named partner to a specific partner service in a Partner Link Configuration.
In this example, you bind BankService partner to the Bank_A service by way of the Partner Link Configuration defined in Creating the Partner Link Configuration.
The partner binding redirects the generic BankService partner to the specific partner when the service is running. If you wish to switch the partner service, you can simply change the value in the Partner Link column and redeploy the service. You do not have to change the underlying implementation to use different partner services.
Double click on the Partner Link field and click the Browse button to select tutorial/MortgageBroker/Partner Link Configuration/Bank_A as illustrated in Figure 14.
Figure 14 Specifying partner bindings
 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved