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.
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.
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:
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.
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.
The tutorial/MortgageBroker/BrokerService resource is the service a user invokes to request a loan. The Service has one interface, defined in the t
utorial/MortgageBroker/BrokerWSDL file (see
Mortgage Broker WSDL). The service has already been created an partially configured. This section describes the remaining configuration steps.
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.
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.
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.