Legal | Privacy


Creating Your First BPEL Project using the BPEL Designer






Creating Your First BPEL Project using the BPEL Designer

Purpose

This tutorial introduces you to JDeveloper BPEL Designer. The tutorial shows you how to create your first Business Process Execution Language (BPEL) project by using the JDeveloper BPEL Designer and deploy it on Oracle BPEL Process Manager.

Approximately 20 minutes

Topics

This tutorial covers the following topics:

Overview
Prerequisites
Creating a Workspace and a BPEL Project
Adding an Activity to the BPEL Process

Deploying the Process to Oracle BPEL Process Manager Server

Running the Deployed Process
Undeploying the Deployed Process and Deleting the Instances

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:

JDeveloper BPEL Designer: JDeveloper BPEL Designer extends the functionality of Oracle JDeveloper 10g and enables modeling, editing, and designing business processes using BPEL. It provides a graphical and user-friendly way to build BPEL processes. JDeveloper uses BPEL as its native format and hence the processes built are portable.

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, you should have:

1.

Creating a Workspace and 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- <ORACLE_HOME> > 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 <ORACLE_HOME>\integration\orabpel\bin folder.

 

2.

Start the JDeveloper BPEL Designer from the Windows Start menu by clicking Start > Programs > Oracle- <ORACLE_HOME> > Oracle BPEL Process Manager 2.0 > JDeveloper BPEL Designer.

 

3.

Wait while JDeveloper BPEL Designer starts up.

 

4.

You see the Applications-Navigator and Connection-Navigator in the Navigation pane. Click View from the menu and select System Navigator to switch to System Navigator.

 

5.

To work with JDeveloper you have to create a workspace and a project. A workspace is a group of related projects. Grouping your files by workspace and project enables you to sort your work logically and hierarchically.

In the System-Navigator right-click Workspace and select New Workspace from the context menu.

 

6.

Enter BPELws for Workspace Name. Uncheck the 'Add a New Empty Project' checkbox and click OK.

Observe that the workspace is created.

 

7.

In the System-Navigator right-click the new workspace, BPELws and select New Project from the context menu.

 

8.

From the New Gallery select Projects under General category and select BPEL Process Project from Items.

 

9.

The BPEL Process Project dialog appears. Enter HelloWorld for BPEL Process Name. You will create a synchronous BPEL process and hence choose Synchronous BPEL Process from the Template drop down list. Click OK.

 

10.

In the System-Navigator observe the files that are created. The BPEL Process Project creates a skeleton for the new synchronous BPEL process HelloWorld. The wizard also builds the process and you can see in the Log window whether or not the build was successful. The following files are created:

File

Description

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.

 

 

11.

To review the WSDL code that is generated, double-click the HelloWorld.wsdl file in the System-Navigator.The WSDL file opens in a new editor tab. Scroll down until you find the text <element name="HelloWorldProcessRequest">. Observe that the HelloWorldProcessRequest and HelloWorldProcessResponse complextype elements are defined.

 

12.

Click HelloWorld.bpel tab. You will see the diagram view of the process that you created. The diagram view provides 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 a partnerLink named client on the left of the window. All other partnerLinks will be displayed on the right.

 

13.

Click Source to switch to the source view.

 

14.

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 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 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.

 

 

Back to Topic List

You created a workspace and a project for your BPEL process. The next task is to add an activity to the process. Add an activity such that it takes the input string, concatenates it to the string "Hello" and returns the result string.

1.

Click Diagram View to shift to the diagram view.

 

2.

In the component pallette select Process Activities from the Preferred Components drop down list.

 

3.

You will see the activities. You should add an activity such that it takes the input string, concatenates the string "Hello" to it, and returns the result string. 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.

 

4.

To add a BPEL <assign> activity to the HelloWorld process, click Assign in the Process Activities list.

Then drag it and place in between the receiveInput and replyOutput 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.

Include notes about Invalid Setting icon.

 

5.

Double-click Assign_1 to change the attributes for the activity. Enter the name createReturnString for the activity. Clilck Copy Rules tab.

 

6.

To enable the concatenation of the input variable with the word Hello, you have to associate a copy rule with the activity. To add a copy rule, click Create.

 

7.

The Create Copy Rule 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 Expression from the Type drop-down list.

Click the icon for XPath Expression Builder.

 

8.

The XPath Expression Builder dialog appears with a list of functions. From the String Functions list, double-click the concat function. The function appears in the Expression Body.

 

9.

Enter "Hello " for firstString ( string ) as shown in the screenshot.

To include the second parameter, double-click the input variable client:Input in the XPath Expression Builder.

Click OK.

 

10.

In the To section of the Create Copy Rule dialog box, expand the Variables node and select the output variable client:result. Click OK.

 

11.

In the Assign dialog box you will see the XPath expressions for both the From and To sections. Click OK.

 

12.

The process is now complete and ready to deploy. Save the process before deploying.

 

 

Deploying the Process to Oracle BPEL Process Manager Server

Back to Topic List

You have completed building the HelloWorld BPEL process. To deploy the HelloWorld process, perform the following:

1.

Recollect that you started the BPEL Process Manager Server in step 1 of Creating a BPEL Project. If you start the JDeveloper BPEL Designer after starting the server, a connection LocalBPELServer is automatically established.

 

2.

In the System-Navigator right-click the project select Deploy > LocalBPELServer > Deploy to default domain

 

3.

You are prompted to enter the password. Enter bpel, the default password in the Password field and click OK.

 

4.

Monitor the messages in the log window and ensure that the process is deployed successfully.

 

 

Running the Deployed Process

Back to Topic List

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

1.

Start the Oracle BPEL Console from the Windows Start menu by clicking Start > Programs > Oracle- <ORACLE_HOME> > Oracle BPEL Process Manager 10.1.2 > BPEL Console. You can also start the BPEL Console by opening the URL http://<host>:9700/imgConsole.

This opens the login page of the BPEL Console. Select the default domain, enter bpel for password, and click Login.

 

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. Click the HelloWorld process link

 

3.

This automatically generates an HTML test page. Enter World in the input text box and click Post XML Message.

 

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 Flow subtab of Instances tab. 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.

 

6.

Click the Audit link to see the text audit trail. You can also click the Debug link to see the debug information for this instance.

 

 

Undeploying the Deployed Process and Deleting the Instances

Back to Topic List

Perform the following steps to undeploy the HelloWorld process and delete all the instances associated with this process:

1.

In the BPEL Console click BPEL Processes tab.

 

2.

Click the HelloWorld process link in the Deployed Processes table.

 

3.

Scroll down and click Undeploy.

Click OK to dismiss the warning dialog box.

 

4.

The process is not undeployed immediately. It may take a while depending on the jobs scheduled for the server. Click Done on the Undeploy BPEL Process page.

 

5.

Click Instances tab to delete all the instances associated with the process.

You will see the instance associated with the HelloWorld process.

 

6.

Click the Instance to go to the instance page.

Select "Delete the Instance" radio button and click Apply.

 

 

 

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

 

 

 

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