![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
The mortgage broker orchestration process stored in the tutorial/MortgageBroker folder of the project is named LoanRequestProcess. Figure 4 illustrates this process.
4. If an error is encountered during processing, the Catch activity is executed and a reply is sent to the customer detailing the fault that was encountered.The following sections describe the configuration of the orchestration process and the activities within the process.Click the LoanRequestProcess resource in the project tree to show the configuration panel of the process. The two tabs that must be configured for this tutorial are the Input Partners tab and the Partners tab.The Input Partners tab defines the port type that this orchestration process implements. In this example, the port type is the BrokerPT in the BrokerWSDL file. Figure 5 illustrates the fields of the Input Partners tab.
1. Click the + button on the right side of the Input Partners field.
2. Double click on the value in the Input Partner Name field and specify Broker as the name for the input partner.
3. Click the Browse button on the right side of the Port Type field to select the WSDL file that contains the port type of this input partner. In this example, the WSDL file is tutorial/MortgageBroker/BrokerWSDL.
4. Select the correct port type in the WSDL file. In this example, there is only one port type, BrokerPT, so it is automatically selected.
5. Click OK to accept the correct port type and dismiss the Select a Resource dialog.
6. Click Apply to apply the changes to the Input Partners tab.The Partners tab defines the partner services that the orchestration process can invoke. In this example, the process can invoke any of the third-party services that implement the abstract BankPT port type. Figure 6 illustrates fields of the Partners tab.
1. Click the + button on the right side of the Partners field.
2. Double click on the value in the Partner Name field and specify BankService as the name for the partner.
3. Click the Browse button on the right side of the Port Type field to select the WSDL file that contains the port type of this partner. In this example, the WSDL file is tutorial/Metadata/BankWSDLAbstract.
4. Select the correct port type in the WSDL file. In this example, there is only one port type, BankPT, so it is automatically selected.
5. Click OK to accept the correct port type and dismiss the Select a Resource dialog.
6. Click Apply to apply the changes to the Partners tab.In this example, the orchestration process references the port type of any of the partners that can be invoked. Later in the tutorial, the partner will be bound to a specific concrete implementation using a Partner Link Configuration resource. Using this type of resource allows you to switch partners without changing your orchestration process implementation.Each activity in the orchestration process must be configured to perform the desired action. Click each activity in the design panel to display the configuration panel for the activity. This section describes the configuration of each activity.The Receive Starter activity receives the loan request message from the customer. Perform the following to configure the activity:
1. Select Broker in the Input Partner field, if it is not automatically selected.
2. Select requestLoanOperation in the Operation field.
3. Click Apply to accept the changes to the configuration.The Invoke activity invokes the third-party partner service. Perform the following to configure the activity:
1. Select BankService in the Partner field, if it is not automatically selected.
2. Select loanApprovalOperation in the Operation field.
3. Click Apply to accept the changes to the configuration.
4. Typically BPEL activities use a variable to hold data to input into the activity. TIBCO ActiveMatrix BusinessWorks BPEL Extension can also use the input mapping functionality of TIBCO ActiveMatrix BusinessWorks. In this tutorial, the input mapping mechanism is used in the Invoke activity. Click the Input tab create the input mappings illustrated in Figure 7.Figure 7 Invoke activity input configuration
5. Click Apply to accept the changes to the configuration.The Reply activity sends a reply to the user whether the loan was accepted or rejected. The TIBCO ActiveMatrix BusinessWorks BPEL Extension provides a Quick Configuration option for reply messages. This tutorial uses this option instead of the Full Configuration option. Perform the following to configure the activity:
1. Select the Receive Starter activity in the ReplyEvent field, if it is not already selected. This specifies that the reply should be directed to the sender of the message that was received by the Receive Starter activity.
2. The Input tab of the Reply activity is used to map the contents of the reply from the results of the Invoke activity. Click the Input tab to create the input mappings illustrated in Figure 8.Figure 8 Reply activity input configuration
3. Click Apply to accept the changes to the configuration.The Catch activity starts an error-handling routine that executes in the event that an error is encountered during processing. Catch activities can be configured to catch a specific error or any unhandled error. In this example, the Invoke activity can receive a fault message from the third-party bank service. Select fault1 in the Fault Name field as illustrated in Figure 9, if it is not already selected. This is the fault that the Invoke activity can throw (see the Error Output tab of the Invoke activity to view the schema of fault1).Figure 9 Catch activity Configuration tabThe Reply With Fault activity replies to a message with a fault indicating an error was encountered. In this example, the Configuration tab of the Reply With Fault activity is set to reply to the Receive Starter activity (similar to the Reply activity above). Also, the input of the Reply With Fault activity is set to return the fault captured by the Catch activity. Create input mappings as illustrated in Figure 10.Figure 10 Reply With Fault input configuration
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |