Legal | Privacy
Creating Your First BPEL Project Using the Oracle BPEL Process Manager

Creating Your First BPEL Project using the BPEL Designer

Purpose

This tutorial introduces you to Oracle BPEL Designer. The tutorial also provides instructions to create your first Business Process Execution Language (BPEL) project by using the Oracle BPEL Designer and then running it on Oracle BPEL Process Manager server.

Approximately 20 minutes

Topics

This tutorial covers the following topics:

Overview
Prerequisites
Creating a BPEL Project

Building and Deploying the Process on Oracle BPEL Process Manager Server

Running the Deployed Process on Oracle BPEL Process Manager Server

Place the cursor over this icon to load and view all the screenshots for this tutorial. (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

Oracle BPEL Process Manager facilitates you to develop applications based on Service-Oriented Architecture (SOA) by composing a set of synchronous and asynchronous services into an end-to-end BPEL process flow. The Oracle BPEL Process Manager provides a developer-friendly and reliable solution for designing, deploying, and managing BPEL business processes.

Oracle BPEL Process Manager consists of three main components:

Oracle BPEL Designer: Oracle BPEL Designer provides a graphical and user-friendly method to build BPEL processes. Oracle BPEL Designer uses BPEL as its native format and, therefore, enables you to view and modify the BPEL source code.
Oracle BPEL Process Manager Server: Oracle BPEL Process Manager provides a scalable and robust implementation of a BPEL server. The Oracle BPEL Process Manager executes standard BPEL processes and provides a “dehydration” capability so that the state of long-running flows is automatically maintained in a database, enabling clustering for both failover and scalability. The BPEL Server leverages an underlying J2EE application server.
Oracle BPEL Console: Oracle BPEL Console provides a mature Web-based interface for management, administration, and debugging of processes deployed to the BPEL server. Audit trails and process history/reporting information are automatically maintained and available both through the BPEL Console and via a Java API.

 

Prerequisites

Back to Topic List

For you to perform this tutorial, we have:

1.

Creating a BPEL Project

Back to Topic List

To create a BPEL project, perform the following:

1.

Start the Oracle BPEL Process Manager server from the Windows Start menu by clicking Start > Programs > Oracle > BPEL Process Manager 2.0 > Start BPEL PM Server.

You can alternatively start the Oracle BPEL Process Manager server from the command prompt by executing the startOraBPEL.bat command located in the <drive:>/orabpel/bin folder.

 

2.

Start the Oracle BPEL Designer from the Windows Start menu by clicking Start > Programs > Oracle >
BPEL Process Manager 2.0 > BPEL PM Designer
.

 

3.

After the Oracle BPEL Designer is started, you can see the desktop development environment. This area in Oracle BPEL Designer is known as Workbench.

When the Workbench is launched, a dialog box is displayed in which you can specify the location of the workspace. The workspace is the directory where your work will be stored. Click OK to select the default location. You can also select the check box to prevent this question from being asked again.

 

4.

After you choose the workspace location, a single Workbench window is displayed. A Workbench window offers one or more perspectives. A perspective contains editors and views, such as the Navigator.

Initially, a Workbench window with the Resource perspective is displayed, with only the Welcome view visible.

Click the arrow labeled Workbench in the Welcome view to see the other views in the Resource perspective.

 

5.

Oracle BPEL Designer Workbench provides seamless-tool integration and controlled openness by providing a common paradigm for the creation, management, and navigation of workspace resources.

A Workbench consists of:

Perspectives: Each Workbench window contains one or more perspectives. A perspective defines the initial set and layout of views in the Workbench window. Each perspective provides a set of functionality aimed at accomplishing a specific type of task or for selecting specific types of resources. Most perspectives in the Workbench comprise an editor area and one or more views.

Views: Views support editors and provide alternative presentations as well as ways to navigate the information in your Workbench. For example, the Navigator view displays the projects and other resources.
Editors: Depending on the type of file that is being edited, the appropriate editor is displayed in the editor area. The editors can be stacked in the editor area and individual editors can be activated by clicking the tab for the editor.

 

6.

In the Oracle BPEL Designer Workbench, click the File menu and select New > Project. The New Project dialog box appears. Select Oracle BPEL Project from the Wizards list and then click Next.

 

7.

The Create a BPEL project dialog box appears. Enter the following details in the dialog box:

BPEL Process Name: HelloWorld

Namespace: http://www.oracle.com/technology/products/ias/bpel
Template: Sync BPEL Process

Then click Finish.

 

8.

The New Project Wizard creates a skeleton for the new synchronous BPEL process HelloWorld. The wizard also builds the process and you can see in the console window whether or not the build was successful. In this process, the wizard also creates the following files:

File

Description

.project Eclipse format .project file
bpel.xml The deployment descriptor for the process. Defines the locations of the WSDL files for services called by this flow, along with other project-specific parameters.
build.xml The Apache Ant script for compiling and deploying this process
HelloWorld.bpel The BPEL source for the process. The New Project Wizard creates an empty flow, with just the minimum activities and definitions for the selected flow type. For a synchronous BPEL process, the only activities will be a <receive> to initiate the flow from a synchronous client request and a <reply> to return.
HelloWorld.wsdl The WSDL (client) interface for this process. This process defines the input and output messages for this flow, the client interface and operations supported, and the BPEL partnerLinkTypes so that the flow can be incorporated into other processes. The New Project Wizard generates a document-literal style WSDL that takes a string input message and returns a string response message.

 

9.

To review the WSDL code that is generated by the New Project Wizard, double-click the HelloWorld.wsdl file in the Navigator view.

 

10.

The WSDL file opens in a new editor tab. Scroll down until you find the text <element name="HelloWorldRequest">. Note that the New Project Wizard has defined HelloWorldRequest and HelloWorldResponse complextype elements that the HelloWorld process flow accepts as input and returns as output respectively.

Close the editor by clicking the cross (x) sign on the tab.

 

11.

Now the content of the BPEL file is displayed. You can see the visual representation providing an overview of the HelloWorld process. On the left is the client interface, which displays operations exposed by the process. Note that the BPEL Designer automatically puts any partnerLink named client on the left of the window. All other partnerLinks will be displayed in a list on the right.

 

12.

Click the Process Map button to view the detail visual representation of the process flow logic of the HelloWorld process. You can use this window to graphically edit the logical flow of the process. You can also see BPEL Pallet and BPEL Inspector to the right of the window displaying activities and properties of the process respectively.

 

13.

To view the BPEL source code, click the BPEL Source tab at the bottom of the window.

 

14.

To review the BPEL source code generated by the New Project Wizard, scroll through the BPEL Source window. The BPEL source code skeleton begins with a <process> element that defines the name and target namespace of the process.

 

15.

The next section in the source code is of partnerLinks. partnerLinks define the other services and processes that a process interacts with. The only partnerLink created automatically by the New Project Wizard for the HelloWorld process is the one for the client interface to the process.

 

16.

The next section in the source code is of global variables that are accessible throughout the process. The New Project Wizard automatically creates global variables for the input and output messages for the HelloWorld process.

 

17.

After the global variables section, you see the main sectiion of the process, which is a single BPEL activity. A BPEL process normally includes a compound activity that contains subactivities. In the HelloWorld synchronous BPEL process, the New Project Wizard creates a sequence, which is a set of activities executed sequentially. The sequence created includes a <receive> activity to get the input message from the client to start the process, followed by a <reply> activity to return the result synchronously to the client.

And finally the code ends with a </process> tag.

 

18.

Shift to the Process Map view by clicking the BPEL Designer tab that is on the left of the BPEL Source tab in the current window.

 

19.

You can add new activities to the current process by using the Process Map view. To display the result of the HelloWorld process as a string, which is the input variable concatenated with the word "Hello." For example, if you enter the input variable as "Oracle" then the process returns "Hello Oracle" as output.

You have to add an <assign> activity to the process flow. A BPEL <assign> activity provides a mechanism for doing simple data manipulation, using XPath expressions. The <assign> activity is listed in BPEL Palette located on the right of the Process Map view.

 

20.

To add a BPEL <assign> activity to the HelloWorld process, click assign on the BPEL Palette. Then drag it and place in between the <receive> and <reply> processes.

After the assign activity is placed between the processes, the process flow looks like the following:
Note: When you drag an activity over the line connecting activities in the process map, a round ball appears to indicate the target drop position. The resulting process map contains the assign activity:

 

21.

You can change the value of the <assign> activity attributes from the BPEL Inspector. Click the name attribute on the BPEL Inspector, and change the value to createReturnStr. The change in the name is also reflected on the process flow.

 

22.

To enable the concatenation of the input variable with the word Hello, you have to associate a copy rule with the <assign> activity. To add a copy rule, click the down arrow (v) to the right of the <assign> activity heading in the BPEL Inspector. Then select Add Copy Rule from the drop-down list.

 

23.

The Oracle BPEL Copy Customizer dialog box appears with the From and To sections that represent the source of the data and the destination variable or element of the activity, respectively. Select the Expression option button, and click the (...) sign for the Oracle BPEL Function Wizard.

 

24.

The Oracle BPEL Function Wizard appears with a list of functions. From the Pick a function list, select the concat function. Then click Next.

 

25.

The Oracle BPEL Function Wizard Step 2 of 2 appears. Enter "Hello " for firstString ( string ).

 

26.

For nextString ( string ), click the v sign. The XPath Picker appears. Click the drop-down list under Variable, and select input. Then click the drop-down list under Part, and select payload. Click the drop-down list under XPath Query, and select input. The selections from the drop-down lists populate the nextString ( string ) text box with an expression. Click Finish.

 

27.

The wizard populates an Expression text box in the Oracle BPEL Copy Customizer.

 

28.

In the To section of the Oracle BPEL Copy Customizer dialog box, click the drop-down list under Variable and select output. Then click the drop-down list under Part, and select payload. Then click the drop-down list under XPath Query and select result. Click Done.

 

29.

The process is now complete and ready to deploy. Save the process before deploying by clicking the Save button icon in the standard toolbar or by pressing [Ctrl] + [S].

 

 

Building and Deploying the Process on Oracle BPEL Process Manager Server

Back to Topic List

Building a process compiles the process flow, and packages all its components into a “BPEL suitcase” JAR file. You can then deploy this JAR file to any Oracle BPEL Process Manager, simply by copying it to the appropriate deployment directory. The build.xml file generated by the wizard will automatically deploy the suitcase to your local server’s default domain, for example <Oracle BPEL Process Manager Install directory>\orabpel\domains\default\deploy. To build and deploy the HelloWorld process, perform the following:

1.

Select the Preferences menu option from the Window menu. Then select BPEL Designer from the right pane, the corresponding dialog box appears on the right pane. In BPEL Process Manager Home Directory, enter the directory path where you installed Oracle BPEL Process Manager. Click OK.

Setting up this preference deploys the BPEL process to the right of the Oracle BPEL Process Manager server automatically after building the HelloWorld process.

 

2.

To build the HelloWorld process, click the Build BPEL Project icon from the standard toolbar or select Build and Deploy BPEL Project from the BPEL menu. The process compiles and packages all the files of the BPEL process and deploys it on the Oracle BPEL Process Manager server. This process generates status messages on the Console view.

 

 

 

3.

You can alternatively deploy the HelloWorld process to the Oracle BPEL Process Manager server by executing the obant command from <Oracle BPEL Designer install home>\workspace\HelloWorld directory in command prompt.

 

 

Running the Deployed Process on Oracle BPEL Process Manager

Back to Topic List

After deploying the HelloWorld process on the Oracle BPEL Process Manager server, perform the following steps to run the process on the server:

1.

Start the BPEL Console by opening the URL http://localhost:9700/BPELConsole on a Web browser. You can also start the console by selecting Start > Programs > Oracle > BPEL Process Manager 2.0 > BPEL Console. This opens the login page of the BPEL Console. Select the Domain as default, and enter the password as bpel.

You can also start the BPEL Console from the Oracle BPEL Designer by clicking the icon Open BPEL Console from the standard toolbar. This opens a browser window with the BPEL Console login page.

 

2.

The BPEL Console appears with the Dashboard tab highlighted. This tab displays all processes that are deployed on the Oracle BPEL Process Manager server with their instance numbers. You can see the HelloWorld process listed under the column Deployed BPEL Processes.

 

3.

Click the HelloWorld process link listed under the column Deployed BPEL Processes. This automatically generates an HTML test form. In the input text box, enter Glenn and click the Post XML Message button.

 

4.

The result of the HelloWorld process is displayed. The Oracle BPEL Process Manager provides you links to get more information about the HelloWorld process in the For more information section.

 

5.

To see the visual audit trail for this completed instance, click the Visual Flow link. The visual audit trail appears under the Instances tab in the Flow subtab. The visual audit trail is a representation of the current state and history of execution of the instance, with the same look and feel as the Oracle BPEL Designer.

You can also click the Audit tab on the left of the window to see the text audit trail or the Debug tab to see the debugger for this instance.

 

6.

Click the <reply> activity in the audit trail flow to see its detail in an Activity Audit Trail page.

 

 

Back to Topic List

In this lesson, you've learned how to:

Create your first BPEL project by using Oracle BPEL Designer

Deploy and run your project by using Oracle BPEL Process Manager

Related Information

To ask a question about this OBE tutorial, post a query on the OBE Discussion Forum.

 

Place the cursor over this icon to hide all screenshots

Copyright © 2004, Oracle Corporation. All rights reserved. Contact Us Legal Notices and Terms of UsePrivacy Statement

 

 

 

 

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