Legal | Privacy
Orchestrating a Simple Process Using Oracle BPEL Process Manager

Orchestrating a Simple Process Using Oracle BPEL Process Manager

This lab covers the use of Oracle JDeveloper 10g BPEL Designer to invoke the United Loan, Star Loan, and Credit Rating Web services. This lab uses JDeveloper to create a BPEL process called MyLoanProcess.

Approximately 40 minutes

Topics

This lab covers the following topics:

Creating a New BPEL Project

Creating the Partner Links

Adding New Process Variables
Designing the Loan Flow Process
Deploying and Testing the Loan Flow Process

Place the cursor over this icon to load and view all the screenshots for this lab. (Caution: Because this action loads all screenshots simultaneously, response time may be slow depending on your Internet connection.)

Note: Alternatively, you can place the cursor over each individual icon in the following steps to load and view only the screenshot associated with that step.

Overview

This lab demonstrates how to design the Loan Flow BPEL process by using Oracle JDeveloper 10g BPEL Designer. MyLoanProcess performs a credit check, by invoking the CreditRatingService synchronously with a loan application from the client. The loan application returned with a credit rating (from the CreditRatingService) is then processed asynchronously by the following two Web services:

UnitedLoan Web service
StarLoan Web service

Back to Topic List

The loan application document, supplied by a client, is first modified with a credit rating value after synchronously invoking a CreditRatingService process. The modified loan document is processed in parallel by the UnitedLoan and StarLoan Web services. Each loan-provider Web service returns a loan offer that is a document for acceptance or processing by the client.

Back to Topic List

Prerequisites

Before starting this lab, you should:

1.

Set Internet Explorer 6.0 as the default browser.

 

2.

Install Oracle JDeveloper BPEL Designer and the Oracle BPEL PM Server into a directory called D:\JDeveloper\JDevBPEL.


3.

Start the Oracle BPEL PM Server as follows:
Start > Programs > Oracle - OracleBPM > Oracle BPEL Process Manager 10.1.2 > Start BPEL PM Server


4.

Start the Oracle JDeveloper 10g BPEL Designer as follows:
Start > Programs > Oracle - OracleBPM > Oracle BPEL Process Manager 10.1.2 > BPEL Designer

You can also start Oracle JDeveloper 10g BPEL Designer by double-clicking the desktop icon labeled BPEL Designer.

Add your machine name to JDeveloper proxy settings. This will enable reading WSDL files from the local machine. Go to Tools > Preferences > Web Browser and Proxy and enter the machine name in the Exceptions field.

 

5.

Deploy the CreditRatingService, StarLoan, and UnitedLoan Web services to the Oracle BPEL PM Server. Launch the command window as follows:
Start > Programs > Oracle - OracleBPM > Oracle BPEL Process Manager 10.1.2 > Developer Prompt

Enter the following commands in the command window:

cd utils\CreditRatingService
obant
cd ..\AsyncLoanService
obant

 

6.

In the BPEL Console, verify that the CreditRatingService, StarLoan, and UnitedLoan Web services have been deployed. To start BPEL Console, select Start > Programs > Oracle - OracleBPM > Oracle BPEL Process Manager 10.1.2 > BPEL Console. Enter the default password, bpel, when prompted. The BPEL Console shows the Web service names in the Deployed BPEL Process column on the Dashboard page.

Place the cursor over this icon to see the image

Note: If IE 6.0 is not the default browser then, explicitly start IE 6.0 and enter the URL http://<hostname.domain>:9700/BPELConsole to start the BPEL Console.

 

7.

Right-click this LoanFlow.xsd link to download and save the link or target to a file in a directory called C:\Hands_on_Labs\bpel_jdev\support_files, or a temporary directory of your choice.

 

Back to Topic List

Creating a New BPEL Project

To create a new BPEL project, perform the following steps:

1.

In the Oracle JDeveloper 10g BPEL Designer menu, select File > New.

Place the cursor over this icon to see the image

 

2.

In the New Gallery window, click the General category and select the Workspace item. Click OK.

Place the cursor over this icon to see the image

 

 

3.

In the Create Workspace dialog box, apply the following field values.

Workspace Name: MyLoanProcessWS

Directory Name: Accept the value automatically resembling the workspace name entered.
Deselect the Add a New Empty Project check box.

Leave the Open in New Navigator check box unselected.

Click OK.

Place the cursor over this icon to see the image

 

4.

The new workspace, MyLoanProcessWS, appears in the JDeveloper Applications - Navigator pane under the Applications folder. Press [Ctrl] + [S] to save the new workspace.

Note: You can select File > Save to save the selected file, or you can select File > Save All to save changes to all files in the project.

 

5.

To create a new BPEL Project, right-click MyLoanProcessWS in the Applications - Navigator and select New Project.

Place the cursor over this icon to see the image

 

6.

In the New Gallery window, click Projects under General and select the BPEL Process Project item. Click OK.

Place the cursor over this icon to see the image

 

7.

In the BPEL Process Project dialog box, enter the following values:

BPEL Process Name: MyLoanProcess

Namespace: http://xmlns.oracle.com/MyLoanProcess, which automatically mirrors the BPEL process name. Do not change this value.
Template: Asynchronous BPEL Process is selected by default. Accept this value.

In the Project Content area, the Use Default check box should be selected.

Click OK.

 

8.

In the Navigator, the following three files are created:

bpel.xml contains partner link bindings for the BPEL project.

MyLoanProcess.bpel contains the BPEL elements describing the BPEL process.
MyLoanProcess.wsdl describes the interfaces for the BPEL process as a Web service.

JDeveloper automatically opens MyLoanProcess.bpel on the Diagram View page. The initial BPEL process activities are shown on the Diagram View page. You can use this page to graphically create and edit the BPEL process.

Select File > Save All to save the new project files.

 

9.

Import the LoanFlow.xsd XML Schema document. The XML schema file provides definitions for the loanApplication and loanOffer types that are used to define the structure of the input and response documents of the BPEL process, respectively.

To import an XML Schema document into the BPEL project directory, select Project Schemas in the Structure pane (MyLoanProcess.bpel must be selected in the Applications - Navigator.) Click Import.

 

10.

In the Import Schema dialog box, click the Browse File System icon.

In the Open dialog navigate to the C:\Hands_on_Labs\bpel_jdev\support_files directory (or the temporary directory into which you downloaded the file) and click Open. Select LoanFlow.xsd.

 

11.

Click OK to close the Import Schema dialog box.

 

12.

In the Structure pane observe that the LoanFlow.xsd file appears under the Project Schema.

You can also check this in the Applications - Navigator.

Select File > Save All to save the changes to the project and workspace.

 

13.

In the Structure pane, expand the Message Types node by clicking the '+' sign. Expand Process WSDL - MyLoanProcess.wsdl and select MyLoanProcessRequestMessage.

Click Edit.

 

14.

In the Edit Message Type - MyLoanProcessRequestMessage window, select payload. Click Edit.

 

15.

In the Edit Message Part - payload window, select Element. Click the Browse Elements icon.

 

16.

In the Type Chooser window, expand Project Schema Files, expand LoanFlow.xsd, and select loanApplication. Click OK.

 

17.

In the Edit Message Part - payload window, click OK.

 

18.

In the Edit Message Type - MyLoanProcessRequestMessage window, click OK.

 

19.

To set the response message type for the BPEL process, select MyLoanProcessResponseMessage in the Structure pane. Click Edit.

 

20.

In the Edit Message Type - MyLoanProcessResponseMessage window for the response message, select payload. Click Edit.

 

21.

In the Edit Message Part - payload window, select Element. Click the Browse Elements icon.

 

22.

In the Type Chooser window, expand Project Schema Files, expand LoanFlow.xsd, and select loanOffer. Click OK.

 

23.

To close the Edit Message Part - payload window, click OK. In the Edit Message Type - MyLoanProcessResponseMessage window, click OK.

 

Back to Topic List

Creating the Partner Links

To create a partner link for each Web service that is invoked by the BPEL process, perform the following steps:

1.

With MyLoanProcess.bpel displayed in the Diagram View, select Process Activities from the Component Palette list.

Place the cursor over this icon to see the image

 

2.

To create a partner link for the CreditRatingService Web service, drag a PartnerLink object from the Component Palette to the Partner Links region on the right of the BPEL process activities.

Place the cursor over this icon to see the image

 

3.

In the Create Partner Link window, click the WSIL Browser icon to open the WSDL Chooser.

Place the cursor over this icon to see the image

 

4.

In the WSDL Chooser window, expand the LocalBPELServer, processes, and default nodes. Select CreditRatingService. Click OK.

Place the cursor over this icon to see the image

 

5.

In the Create Partner Link window, the WSDL File and Partner Link Type fields are populated by your selection in the WSDL Chooser. Enter or select the following field values.

Name: creditRatingService

My Role: ----- Not Specified -----

Partner Role: CreditRatingServiceProvider

Click OK.

The creditRatingService partner link box appears in the Partner Links region on the right of the BPEL process in the Diagram View.

 

6.

To create a partner link for the UnitedLoan Web service, drag a new PartnerLink object from the Component Palette to the Partner Links region on the right of the BPEL process activities.

 

7.

In the Create Partner Link window, click the WSIL Browser icon to open the WSDL Chooser. In the WSDL Chooser, expand LocalBPELServer, processes, and default nodes and select UnitedLoan. Click OK.

 

8.

In the Create Partner Link window for the UnitedLoan Web service, the WSDL File and Partner Link Type fields are populated by your selection in the WSDL Chooser. Enter or select the following field values.

Name: unitedLoanService

My Role: LoanServiceRequester

Partner Role: LoanServiceProvider

Click OK.

The unitedLoanService partner link box is added to the Partner Links region on the right of the BPEL process in the Diagram View.

 

9.

To create a partner link for the StarLoan Web service, drag a PartnerLink object from the Component Palette to the Partner Links region on the right.

 

10.

In the Create Partner Link window, click the WSIL Browser icon to open the WSDL Chooser. In the WSDL Chooser, expand LocalBPELServer, processes, and default nodes. Select StarLoan. Click OK.

 

11.

In the Create Partner Link window for the StarLoan Web service, the WSDL File and Partner Link Type fields are populated by your selection in the WSDL Chooser. Enter or select the following field values:

Name: starLoanService

My Role: LoanServiceRequester

Partner Role: LoanServiceProvider

Click OK.

The starLoanService partner link box is added to the Partner Links region on the right of the BPEL process in the Diagram View.

Select File > Save All to save the changes to the project files.

 

Back to Topic List

Adding New Process Variables

To create variables for activities in the MyLoanProcess BPEL process, perform the following steps:

1.

In the MyLoanProcess.bpel - Structure pane, expand Variables, Process, and Variables to view two variables defined as inputVariable and outputVariable.

Place the cursor over this icon to see the image

 

2.

To create an input variable for the CreditRatingService, in the Structure pane select Variables under the Process subnode. Then click Create.

Place the cursor over this icon to see the image

 

3.

In the Create Variable window, enter crInput in the Name field, select Message Type, and click the Browse Message Types icon .

 

4.

In the Type Chooser window, expand Message Types, Partner Links, creditRatingService, CreditRatingService, and Message Types. Select CreditRatingServiceRequestMessage. Click Ok.

 

5.

In the Create Variable window, click OK.

The crInput variable appears in the list of BPEL process variables in the Structure pane.

 

6.

Create an output variable for the CreditRatingService. Select Variables under the Process subnode in the Structure pane. Click Create.

In the Create Variable window, enter crOutput in the Name field. Select Message Type with the value CreditRatingServiceResponseMessage selected from the CreditRatingService, Message Types node. Click OK. In the Create Variable window, click OK.

 

7.

Create an error variable for the CreditRatingService, select Variables, and then click Create.

In the Create Variable window, enter crError in the Name field. Select Message Type with the value CreditRatingServiceFaultMessage selected from the CreditRatingService, Message Types tree. Click OK. In the Create Variable window, click OK.

Select File > Save All to save the changes to the project files.

 

8.

Create the loan application input variable for the UnitedLoan and StarLoan Web Services, select Variables, and then click Create.

In the Create Variable window, enter loanApplication in the Name field. Select Message Type with the value LoanServiceRequestMessage selected from the unitedLoanService, Message Types tree. Click OK. In the Create Variable window, click OK.

 

9.

Create the loan offer output variable for the UnitedLoan Web Service, select Variables, and then click Create.

In the Create Variable window, enter unitedOffer in the Name field. Select Message Type with the value LoanServiceResultMessage selected from the unitedLoanService, Message Types tree. Click OK. In the Create Variable window, click OK.

 

10.

Create the loan offer output variable for the StarLoan Web Service, select Variables, and then click Create.

In the Create Variable window, enter starOffer in the Name field. Select Message Type with the value LoanServiceResultMessage selected from the starLoanService, Message Types tree. Click OK. In the Create Variable window, click OK.

Select File > Save All to save the changes to the project files.

 

11.

In the Structure pane for MyLoanProcess.bpel, verify that the eight process variables (displayed in the accompanying screenshot) are defined under the BPEL Structure > Variables > Process > Variables node.

 

Back to Topic List

Designing the Loan Flow Process

During the creation of the BPEL process, you should regularly save the changes made to your MyLoanProcess.bpel file and project. After completing the steps for each new BPEL activity, select File > Save All to save the changes that you make.

This section covers the following subtopics:

Invoking the Synchronous CreditRatingService Web Service
Adding a Fault Handler for the CreditRatingService
Invoking the Asynchronous UnitedLoan and StarLoan Web Services in Parallel

Adding a Conditional Branch to Select a Loan Offer

Back to Topic List

Invoking the Synchronous CreditRatingService Web Service

To design the loan flow process activities that synchronously invoke the CreditRatingService Web service, perform the following steps:

1.

In the JDeveloper Diagram View, drag a Scope from the Component Palette to the region between the receiveInput and callbackClient activities.

Place the cursor over this icon to see the image

 

2.

To name the new Scope, double-click Scope_1 in the Diagram View. On the General page of the Scope dialog box, enter the value GetCreditRating in the Name field. Click OK.

Place the cursor over this icon to see the image

 

3.

To expand, click for the GetCreditRating scope.

 

4.

In the Diagram View, drag an Assign activity from the Component Palette to the region labeled Drop Activity Here in the GetCreditRating scope.

 

5.

 

Next, create a copy rule to get the SSN value from the inputVariable into the crInput variable for passing to the CreditRatingService. To do this, double-click the Assign_1 activity to display the Assign properties. Click Create on the Copy Rules page.

 

6.

In the Create Copy Rule window, select Variable as Type for both From and To sections. (This is the default.)

In the From section, expand Process, Variables, inputVariable, payload, ns1:loanApplication, and select ns1:SSN.

In the To section, expand Process, Variables, crInput, payload, and select ns2:ssn.

Observe the XPath Query for the chosen variables in the corresponding XPath fields. Click OK to save the copy rule settings.

 

7.

Check the new copy rule details in the Assign properties section. Click OK. The Invalid Settings error message is cleared if the details entered are valid.

 

8.

Drag an Invoke activity from the Component Palette to the GetCreditRating Scope after the Assign_1 activity:

 

9.

To enable the Invoke activity to initiate the CreditRatingService, double-click the Invoke_1 activity to set the following property values on the General page.

Name: invokeCR

Partner Link: creditRatingService

Input Variable: crInput. (Click the Browse Variables icon and choose crInput)
Output Variable: crOutput (Click the Browse Variables icon and choose crOutput)

Click OK.

 

10.

Drag another Assign activity from the Component Palette to the GetCreditRating Scope after the invokeCR activity.

 

11.

Double-click the Assign_2 activity. To add a copy rule, click Create.

 

12.

In the Create Copy Rule window, select Variable as Type for both From and To sections (This is the default.)

In the From section, expand Process, Variables, crOutput, payload, and select ns2:rating.

In the To section, expand Process, Variables, loanApplication, payload, ns1:loanApplication, and select ns1:creditRating.

Observe the XPath Query for the chosen variables in the corresponding XPath fields. Click OK to save the copy rule settings.

 

13.

Check the new copy rule details in the Assign properties section. Click OK. The Invalid Settings error message is cleared if the details entered are valid.

Select File > Save All to save the changes to the BPEL project.

 

Back to Topic

Adding a Fault Handler for the CreditRatingService

To add the process activities for handling faults that are returned by the CreditRatingService Web service and terminate the BPEL process, perform the following steps:

1.

You want to add a fault handler for the NegativeCredit fault that is generated when the CreditRatingService is invoked with an SSN value that starts with a leading zero. To do so, first click the Add Catch Branch icon on the GetCreditRating scope.

 

2.

Double-click the icon in the Add Catch branch.

 

3.

On the Catch page, click the Browse Faults icon to choose the fault variable.

Note: The Fault Name must be called NegativeCredit, as defined in the WSDL for the CreditRatingService Web Service. The namespace prefix, ns2, must match the namespace prefix that is used to qualify the crError variable in this BPEL process.

 

4.

In the Fault Chooser dialog box, expand Partner Links, creditRatingService, CreditRatingService, and select Fault - NegativeCredit. Click OK.

 

5.

For Fault Variable, click the Browse Faults icon and choose crError. Click OK.

 

6.

To handle the fault, drag an Assign activity to the region labeled Drop Activity Here in the ns2:NegativeCredit Catch branch.

 

7.

To add the copy rules needed to indicate that the loan offer is not approved in the outputVariable, double-click Assign_3. Click Create.

 

8.

In the From section of the Create Copy Rule window, set the Expression field to the value
string('None - rejected because of bad credit') by using the following sequence of actions:

Choose the Expression option from the Type drop-down list, and then click in the Expression field.

Press [Ctrl] + [Space] to invoke the XPath Building Assistant.

Enter st to limit the list of XPath functions displayed, and then double-click string(any input) as String.
Enter the text 'None - rejected because of bad credit' within the brackets of the string() function.

 

9.

In the To section, expand Process, Variables, outputVariable, payload, ns1:loanOffer, and select ns1:providerName. Click OK.

 

10.

In the Assign properties section, click Create to add a second copy rule.

 

11.

In the From section of the Create Copy Rule window, set the Expression field value to the function false() by using the XPath Building Assistant.

 

12.

In the To section, expand Process, Variables, outputVariable, payload, ns1:loanOffer, and select ns1:selected. Click OK.

 

13.

In the Assign properties section, click Create to add a third copy rule.

 

14.

In the From section of the Create Copy Rule window, set the Expression field value to the function false() by using the XPath Building Assistant.

 

15.

In the To section, expand Process, Variables, outputVariable, payload, ns1:loanOffer, and select ns1:approved. Click OK.

 

16.

In the Assign properties section, click Create to add the fourth and last copy rule.

 

17.

In the From section of the Create Copy Rule window, set the Expression field value to number (100) by using the XPath Building Assistant.

 

18.

In the To section, expand Process, Variables, outputVariable, payload, ns1:loanOffer, and select ns1:APR. Click OK.

 

19.

Verify that there are four copy rules in the Assign properties. Click OK.

 

20.

To call back the client, drag an Invoke activity from the Component Palette to the region after Assign_3 in the ns2:NegativeCredit Catch branch.

 

21.

Double-click the Invoke_1 activity. In the Invoke properties, set the following field values:

Name: badCreditClientCallback

Partner Link: client

Input Variable: outputVariable
Output Variable is empty.

Click OK.

 

22.

To terminate the BPEL process due to the occurrence of a NegativeCredit fault, drag a Terminate activity from the Component Palette after the badCreditClientCallback invoke activity in the ns2:NegativeCredit Catch branch.

Note: Click the collapse icon at the upper-left corner of the GetCreditRating scope to minimize the area used.

Select File > Save All to save the changes to the BPEL project.

 

Back to Topic

Invoking the Asynchronous UnitedLoan and StarLoan Web Services in Parallel

To design the process activities that asynchronously invoke the UnitedLoan and StarLoan Web services in parallel, perform the following steps:

1.

To create a scope for the parallel flow, drag a Scope component from the Component Palette after the first GetCreditRating scope.

 

2.

To change the name of the new scope, double-click Scope_1. Enter GetLoanOffers in the Name field. Click OK.

 

3.

Expand the GetLoanOffers scope. To initialize the loanApplication variable, drag an Assign activity to the Drop Activity Here region of the GetLoanOffers scope.

 

4.

To set the assign activity properties, double-click the Assign_4 activity. Click the General tab. Change the Name field contents to InitializeInput. Click the Copy Rules tab.

Click Create.

 

5.

In the Create Copy Rule window, select Variable as Type for both the From and To sections. (This is the default.)

In the From section, expand Process, Variables, inputVariables, and select payload.

In the To section, expand Process, Variables, loanApplication, and select payload. Click OK.

Click OK.

 

6.

To create the parallel flow, drag a Flow component to the region after the InitializeInput assign activity.

The flow is automatically expanded and contains parallel left and right regions for activities.

 

7.

On the left side of the flow, drag an Invoke component to the Drop Activity Here region.

 

8.

Double-click Invoke_1, and then set the following Invoke properties.

Name: invokeUnitedLoan

Partner Link: unitedLoanService

Input Variable: loanApplication

Note: The Output Variable property cannot be set when invoking an asynchronous Web service.

Click OK.

 

9.

On the left side of the flow, drag a Receive component after the invokeUnitedLoan activity.

 

10.

Double-click Receive_1, and then set the following Receive properties.

Name: receive_invokeUnitedLoan

Partner Link: unitedLoanService

Variable: unitedOffer

Note: Do not select the Create Instance check box.

Click OK.

 

11.

On the right side of the flow, drag an Invoke component to the Drop Activity Here region.

 

12.

Double-click Invoke_1, and then set the following Invoke properties.

Name: invokeStarLoan

Partner Link: starLoanService

Input Variable: loanApplication

Click OK.

 

13.

On the right side of the flow, drag a Receive component after the invokeStarLoan activity.

 

14.

Double-click Receive_1, and then set the following Receive properties.

Name: receive_invokeStarLoan

Partner Link: starLoanService

Variable: starOffer

Note: Do not select the Create Instance check box.

Click OK.

Collapse the GetLoanOffers scope.

Select File > Save All to save the changes to the BPEL project.

 

Back to Topic

Adding a Conditional Branch to Select a Loan Offer

To create a conditional branch of BPEL activities to select the best loan offer from either the UnitedLoan or the StarLoan Web services, perform the following steps:

1.

Drag a Scope component after the GetLoanOffers scope.

 

2.

To set the scope name, double-click Scope_1 and enter ChooseLoanOffer in the Name property: Click OK.

 

3.

To create a conditional branch, expand the ChooseLoanOffer scope and drag a Switch activity to the Drop Activity Here region.

The switch activity implements a conditional branch that initially contains a <case> branch on the left and an <otherwise> branch on the right.

 

4.

To create the condition, double-click the <case> branch.

 

5.

In the Switch Case properties, use the XPath Building Assistant to construct the following condition in the Expression field.

bpws:getVariableData('unitedOffer', 'payload', '/ns1:loanOffer/ns1:APR') > 
bpws:getVariableData('starOffer', 'payload', '/ns1:loanOffer/ns1:APR')

Click in the Expression field. Press [Ctrl] + [Space] to invoke the XPath Building Assistant. Double-click the bpws:getVariableData entry, with three String arguments, from the XPath Building Assistant list. Set arguments as shown in the expression above. After the first expression is complete type a '>' symbol and set the second expression. Click OK.

Note: the XPath Building Assistant provides a selection of values for each argument.

 

6.

If the <case> conditional expression is true, its branch is processed. Therefore, the StarLoan loan offer should be selected because it is better than (less than) the UnitedLoan loan offer. To select the starOffer, drag an Assign component to the Drop Activity Here region in the <case> branch.

 

7.

Double-click Assign_4. To copy the starOffer to the outputVariable, in the Assign properties click the General tab. Enter selectStarOffer in the Name property. Click the Copy Rules tab.

Click Create to open the Create Copy Rule window. Select Variable as Type in the From and To sections.

In the From section expand Variables, starOffer, and select payload.

In the To section expand Variables, outputVariable, and select payload. Click OK.

Click OK to close the Assign property dialog box.

 

8.

To select the unitedOffer in the <otherwise> branch, drag another Assign component to the Drop Activity Here region.

Double-click Assign_4.

 

9.

In the Assign properties, click the General tab. Enter selectUnitedOffer in the Name property. Click the Copy Rules tab.

Click Create to open the Create Copy Rule window. Select Variable as Type in the From and To sections.

In the From section expand Variables, unitedOffer, and select payload.

In the To section expand Variables, outputVariable, and select payload. Click OK.

Click OK to close the Assign property dialog box.

 

10.

Confirm that the switch activity in the ChooseLoanOffer scope contains the selectStarLoan activity in the <case> branch and the selectUnitedLoan activity in the <otherwise> branch.

Select File > Save All to save the changes to the BPEL project.

 

Back to Topic

This section covers the following subtopics:

Deploying the MyLoanProcess BPEL process
Test : Successfully Running MyLoanProcess to Obtain a Loan Offer

Back to Topic List

Deploying the MyLoanProcess BPEL process

To deploy the MyLoanProcess BPEL project to the BPEL Process Manager Server, perform the following steps:

1.

In the JDeveloper Applications - Navigator, right-click the MyLoanProcess project node.

Place the cursor over this icon to see the image

Select Deploy > LocalBPELServer> Deploy to default domain. Enter the default domain password, bpel, when you are prompted to enter the password.

Note: JDeveloper automatically compiles the BPEL process. During compilation, JDeveloper creates a BPEL suitcase in the form of a Java Archive (JAR file), which is deployed to the BPEL Process Manager Server.

 

2.

Track the progress of compiling and deploying the BPEL process in the Messages page of the Messages - Log window.

Place the cursor over this icon to see the image

Note: Make sure that compilation and deployment are successful, before testing the deployed BPEL process. To wrap the message lines in the Messages page, right-click anywhere in the Messages page area and select Wrap from the context menu.

 

Back to Topic

Test : Successfully Running MyLoanProcess to Obtain a Loan Offer

To test the success of the MyLoanProcess BPEL process in obtaining a loan offer, perform the following steps:

1.

To view the deployed BPEL process, open a browser window and enter the following URL to display the BPEL Console page. The BPEL Console can also be started by selecting Start > Programs > Oracle - OracleBPM > Oracle BPEL Process Manager 10.1.2 > BPEL Console.

http://localhost:9700/BPELConsole

Place the cursor over this icon to see the image

A MyLoanProcess link appears under the Deployed BPEL Processes column on the Dashboard page.

 

2.

On the Dashboard page, click the MyLoanProcess link.

Place the cursor over this icon to see the image

 

3.

On the Initiate tab of the BPEL Processes page, enter details in the HTML form fields of the loanApplication as shown in the screenshot. Click Post XML Message to initiate the BPEL process.

Place the cursor over this icon to see the image

 

4.

On the updated Initiate tab of the BPEL Processes page, click the Visual Flow link.

Place the cursor over this icon to see the image

 

5.

On the Flow tab of the Instances page, scroll down to the end of the page.

Note: The starLoanService (onResult) activity is awaiting manual completion. You learn how to approve the loan in the next lab.

 

Back to Topic

 

To manually approve the StarLoan offer, perform the following steps:

1.

To manually approve the StarLoan offer, open a new browser window. Enter the following URL to start the StarLoanUI Web application:

http://localhost:9700/StarLoanUI

Click the Assign APR Task link.

Place the cursor over this icon to see the image

 

2.

On the Assign APR Task page of the StarLoanUI Web interface, click Approve:

Place the cursor over this icon to see the image

The default value of 7.4 in the APR field is greater than the UnitedLoan Web service offer of 5.7. In this case, the UnitedLoan offer is selected by the BPEL process flow.

 

3.

The Assign APR Task has been completed page appears.

Place the cursor over this icon to see the image

Close the browser window.

 

4.

On the browser window containing the BPEL Console Web interface, right-click any white-space area. Select Refresh from the context menu to refresh the visual flow on the Instances page.

Place the cursor over this icon to see the image

 

5.

Scroll to the bottom of the Flow tab to see that the ChooseLoanOffer scope contains the selectUnitedOffer assign activity. Click the callbackClient link or icon, to view the loan offer document that is returned to the client.

Place the cursor over this icon to see the image

 

6.

The Activity Audit Trail dialog box displays the callbackClient outputVariable contents.

Place the cursor over this icon to see the image

The value United Loan appears in the <providerName> element, with an APR element value of 5.7.

Close the Activity Audit Trail window.

 

Back to Topic

 

In this lab, you've learned how to:

Create a new BPEL project by using Oracle JDeveloper 10g BPEL Designer

Add partner links for each Web service that is invoked by a BPEL process

Add variables for passing XML data in requests and responses between the Web services and BPEL process

Visually design a BPEL process by using Oracle JDeveloper 10g BPEL Designer
Compile and deploy the BPEL process by using Oracle JDeveloper 10g BPEL Designer
Test the BPEL process in the BPEL Console

Back to Topic List

To learn more about Oracle BPEL products, refer to additional OBEs on the OTN Web site.

Back to Topic List

Place the cursor over this icon to hide all screenshots.

 

E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy