Developer Guide to BPEL Designer: The BPEL Project
Last Updated: 23 October 2006
Contributed by
Bob May, maintained by
Dmitry Markovski
Contents
Developer Guide to BPEL Designer
Understanding the BPEL Project
To create your own BPEL project, you can either create your own BPEL
module from scratch or begin by creating sample processes.
The BPEL project provides the NetBeans Enterprise
Pack/runtime integration by enabling point-and-click support for the
following:
-
Using the New Project Wizard to create a New BPEL Project and a Composite Application Project.
-
Importing WSDL Resources to act as partner services in the business process.
-
Creating new WSDL Resources, as needed.
-
Importing XML Schema Resources.
-
Adding to the business process diagram, further defining the elements
by using property editors, custom editors, and pop-up menu actions. As
needed, adding elements to do web-service tasks or perform basic
activities.
-
Adding to the source code of the BPEL, WSDL and XSD files.
-
Checking and validating XML source code.
-
Building and deploying the project to the BPEL runtime in the Application Server.
-
Test running BPEL processes by sending sample messages to the deployed process or processes.
-
Debugging deployed business processes
Accordingly, the typical procedure to follow when building a BPEL process is:
-
Build your BPEL Module project.
Use the BPEL Designer to create the project.
-
Create a Composite Application project.
Create the project if you have not created it earlier; for sample
processes, Composite Application projects are created automatically for
you.
-
Add the BPEL Module as a JBI Module to the Composite Application project.
-
(Optional) Build the Composite Application project.
-
Make sure that the Application Server is started.
-
Deploy the Composite Application project
-
Create test cases.
For sample processes, test scenarios are automatically created for you;
for new projects, you need to create at least one test scenario.
-
Run one or all test cases.
Deploying and testing require that the Application Server is running.
The build, deploy and test run steps are specific to the Runtime
integration. At this time there are no standards for these tasks in the
BPEL server community, so these tasks are necessarily specific to a
given server vendor.
The BPEL source artifact generated by the BPEL
project Design view will be close to the standard BPEL 2.0 with the
exceptions listed in BPEL 2.0 Elements Not Present in This Release.
top
Creating a New BPEL Project
You can use the IDE to create a new BPEL Project. To do so:
-
In the IDE, from the main menu, choose File > New Project and then perform the following steps:
-
Under Categories, select Service Oriented Architecture.
-
Under Projects, select BPEL Module.
-
Click Next.
-
Supply the Project Name, Project Location and Project Folder fields or accept the defaults.
-
Click Finish.
The Projects window now contains a project node for the BPEL Module.
-
To create a BPEL file for your project, right-click the Process Files node and choose New > BPEL Process from the pop-up menu.
-
In the New BPEL Process dialog box, specify the file name, folder and target namespace. Click Finish.
-
To create a WSDL file for your project, right-click the Process Files node and choose New > WSDL from the pop-up menu.
-
In the New BPEL WSDL dialog box, specify the file name, folder and
target namespace. Optionally, select the Import XML Schema File(s)
checkbox and browse for a Schema file to import. Click Finish.
Exploring the BPEL Project in the Projects Window
A typical BPEL Module project contains a BPEL source file, WSDL and XSD files.
Take a look at the artifacts you have created:
-
In the Projects window, expand the created BPELModule1 node and the Process Files node.
The Process Files node contains these items:
-
newProcess.bpel, the BPEL process
-
newWSDL.wsdl, the process web service interface.
-
Double-click the newProcess.bpel node.
Notice the following:
-
The Source Editor contains a tab for newProcess.bpel .
-
The newProcess.bpel diagram is shown in the Design view.
The Design view is the business processes visual designer. In this
view, you can visually model a business process. The BPEL Design tool
automatically generates BPEL code that corresponds to the visual
design.
-
The Palette of BPEL elements opens to the right of the Source Editor.
-
The Properties window opens for a selected element below the Palette.
-
The Navigator window shows the BPEL logical view of the BPEL process.
-
The BPEL Mapper window appears in the bottom (if it does not appear
automatically, choose Window > BPEL Mapper from the main menu).

Click to enlarge
-
Double-clicking the newWSDL.wsdl node opens the WSDL Editor where you can view and modify your newWSDL.wsdl file.
Properties of a BPEL Module Project
You open the Properties dialog box for a BPEL Module project by
right-clicking the BPEL Module project node and choosing Properties.
The tree in the left pane shows that you have access to two pages:
-
General
-
(Build) > Subproject References
The General
page allows you to view the path of the folder containing the project's
files, to view or modify the prefix for the project service engine
(such as com.sun.bpelse), and to supply aliases and descriptions for
the project's Assembly Unit and Application Subassembly.
The Subproject References
page appears only for BPEL Module projects that can contain
subprojects. It allows you to view, add, remove, and rearrange
subprojects (.jar files) referenced by the BPEL Module project.
top
Creating a New JBI Deployment Project
A BPEL project is not directly deployable. You must first add a BPEL
project, as a JBI module, to a Composite Application project. You can
then deploy the Composite Application project. Deploying the project
makes the service assembly available to the application server, thus
allowing its service units to be run. For more information on Composite
Application projects, see The BPEL Runtime section.
Creating Composite Application Projects
The New Project wizard guides you through the steps needed to create a Composite Application project.
To create a new Composite Application project:
-
Choose File > New Project (Ctrl-Shift-N).
-
In the Categories list, select Service Oriented Architecture and in the
Projects list, select Composite Application and click Next.
-
In the Name and Location page, name the project and specify the location of project files.
-
To set the new Composite Application project as main, leave the Set as Main Project checkbox selected.
-
Click Finish.
The new Composite Application project appears in the Projects window.
To be able to deploy and test-run your business process, add the BPEL
Module as a JBI module to the Composite Application project.
Building a BPEL Module Project
When you build a project, the IDE compiles the BPEL source file and
packages the BPEL file and web service artifacts, including WSDL and
XSD files, into a JAR archive. You should add this project JAR file to
a Composite Application project and then deploy it to the JBI server.
Follow this procedure to build a BPEL Module Project:
-
In the Projects window, right-click the BPEL Module's node and choose Build Project.
-
Watch for the BUILD SUCCESSFUL message in the Output window.
-
You can also perform a clean build by right-clicking the BPEL Module's
node in the Projects window and choosing Clean and Build Project.
Adding JBI Modules to Composite Application Projects
To add a JBI Module project to the Composite Application project:
-
In the Projects window, right-click the Composite Application project's node and choose Add JBI Module.
-
In the Select Project dialog box, select the BPEL Module project
folder, make sure that the project's JAR file has appeared in the
Project JAR Files list, and click Add Project JAR Files.
To verify that the BPEL Module has been added as a
JBI Module, in the Projects window, expand Composite Application
project > JBI Modules. You should see the JAR file of the BPEL
Module project.
top
Deploying a Composite Application Project to the JBI Server
The Deploy action compiles the files in the Composite Application
project, packages the compiled BPEL and related web service artifacts
(including WSDL and XSD files) into an archive, and deploys them to the
JBI server.
You can deploy the Composite Application Project:
-
Right-click the Composite Application project node, and choose Deploy Project.
-
In the Warning dialog box, make sure the Sun Java Application Server is selected and click OK.
-
Deployment has succeeded if you see the success messages in the Output window.
-
If the Output window is not visible, choose Window > Output.
-
Switch to the Runtime window and expand Servers > Sun Java System Application Server > JBI, right-click the Service Assemblies node, and
-
Choose Refresh. You should see the the deployed Service Assembly.
top
Creating Sample Processes in the BPEL Designer
The best way to get acquainted with constructing BPEL diagrams is to
create sample processes. You can design your BPEL process by modifying
existing sample processes.
For samples, the New Project sample wizard
automatically generates both types of projects, BPEL Module and
Composite Application, so you do not need to create separately each of
these projects. However, to deploy the sample application, you need to
manually add the BPEL Module as a JBI module to the Composite
Application project.
In the BPEL Designer, you can create the following sample processes:
A Synchronous Sample Process
A synchronous process refers to a conversation style in which the
client sends a message to the process, waits for a reply, and continues
work only when the reply comes back. When you create a synchronous
sample process, the IDE generates a skeletal process with a single
synchronous operation and the required WSDL and XML schema files.
An Asynchronous Sample Process
An asynchronous process applies to long-running conversations, in which
the client does not wait for a reply from the process before continuing
its work. Instead of returning the result synchronously to the client,
this process accepts the client's request, performs work that might be
long-running, and then asynchronously calls back to the client when the
work is done. When you create an asynchronous process, the IDE
generates a skeletal process with one incoming and one outgoing
asynchronous operations and the required WSDL and XML schema files.
Note that any particular process can consist of
an arbitrary collection of synchronous and asynchronous interactions
with one or more conversational partners.
Travel Reservation Service Sample
This sample is a real-world BPEL process sample constructed using the
majority of BPEL elements and several partner web services.
Together with the Travel Reservation Service
sample, the wizard creates another project, Reservation Partner
Services, a basic EJB and JMS based implementation of the three partner
services.
Creating a Sample BPEL Project: General Flow
To create a sample BPEL project:
-
Choose File > New Project (Ctrl-Shift-N).
-
In the Categories list, expand the Samples node and select Service Oriented Architecture.
-
In the Projects list, select the sample project you want to create and click Next.
-
In the Name and Location page, name the project and specify the location of project files.
-
Click Finish.
The wizard creates two types of projects for the selected sample: a
sample BPEL Module project and a sample Composite Application project.
You are free to modify the sample business process and or add
additional BPEL processes to the BPEL Module. To deploy, test-run, and
debug the process, add the sample BPEL project as a JBI module to the
Composite Application project.
top
Copyright and Trademark Notice