Building a BPEL proccess with Netbeans BPEL Designer (part 1)
2010-10-29 01:18
Write comment1. Abstract
The main goal of this tutorial is to produce a sample web service for a travel agency portal that will be consumed by visitors looking for travel-related information, the web service will return travel costs, destination weather and any more available information.To provide such service, we need to call a bunch of fine grained web services via a web service orchestration engine using a standardized language called BPEL "Business Process Execution Language".
Zero line coding...
In this tutorial we're not going to write any line of code, we will use a powerful BPEL Designer to build the process only by Drag-n-Drop actions (thanks to Netbeans BPEL Designer).The figure below is an overall description about how BPEL orchestration works.
Using a BPEL Designer, a Business expert will produce a Process flow that will be executed with a BPEL Engine (application side - Sun BPEL engine).

During this first part of the tutorial, we'll get the focus on the basics:
- Installing Glassfish ESB on a remote Linux server (headless mode)
- Adding the SOA Plugin to your Netbeans
- Integrating the Glassfish ESB with the Netbeans IDE
2. Preparing the environment
2.1 JDK
The Java Development Kit (JDK) must be installed, and the JAVA_HOME environment variable must be set.NOTICE:
- Supported JDK: Sun JDK: version 1.5.0_14 or later for JDK 5, or version 1.6.0_10 or later for JDK 6.
- Avoid: JDK 1.6.0_13 and 1.6.0_14 due to some incompatibilities with several of the design time wizards.
2.2 Installing Glassfish ESB V2.1 for Linux ( Headless mode )
1) Download Glass Fish ESB v2.1 from java.net or directly from this link.2) Login to your system as root and copy the downloaded file into your /root directory.
3) In the same directory create a new file state.xml then copy-paste into this file the following XML code.
<?xml version="1.0" encoding="UTF-8"?>
<state xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="state-file.xsd">
<components>
<product
platform="windows linux solaris-sparc solaris-x86 macosx-ppc macosx-x86 aix"
status="to-be-uninstalled" uid="nb-base" version="6.5.1.0.200905151554">
<properties>
<property name="installation.location.windows">$N{install}/netbeans</property>
<property name="minimum.jdk.version">1.5.0.6</property>
<property name="minimum.jdk.version.windows-ia64">1.5.0</property>
<property name="preferred.jdk.version.macosx">1.5.0.13.0</property>
<property name="maximum.jdk.version">10.0.0</property>
<property name="minimum.jdk.version.linux-ppc64">1.5.0</property>
<property name="minimum.jdk.version.aix">1.5.0</property>
<property name="installation.location.macosx">$N{install}/netbeans.app</property>
<property name="minimum.jdk.version.linux-ppc">1.5.0</property>
<property name="installation.location">$N{install}/netbeans</property>
</properties>
</product>
<product
platform="windows linux solaris-sparc solaris-x86 macosx-ppc macosx-x86 aix"
status="to-be-uninstalled" uid="nb-soa" version="6.5.1.090515.0" />
<product platform="linux" status="to-be-installed" uid="glassfish"
version="9.1.0.60e.20080411">
<properties>
<property name="password">adminadmin</property>
<property name="jmx.admin.port">8686</property>
<property name="username">admin</property>
<property name="vendor.jdk.allowed.pattern">Sun Microsystems.*</property>
<property name="jms.port">7676</property>
<property name="maximum.jdk.version">1.6.99</property>
<property name="minimum.jdk.version">1.5.0</property>
<property name="jdk.location">/usr/lib/jvm/java-6-sun</property>
<property name="installation.location">/opt/GlassFishESBv21/glassfish</property>
<property name="http.port">8080</property>
<property name="https.port">8181</property>
<property name="preferred.jdk.version.macosx">1.5.0.13.0</property>
<property name="admin.port">4848</property>
<property name="iiop.port">3100</property>
<property name="vendor.jdk.allowed.pattern.aix">IBM.*</property>
<property name="iiop.mutualauth.port">3920</property>
<property name="iiop.ssl.port">3820</property>
<property name="vendor.jdk.allowed.pattern.macosx">Apple.*</property>
</properties>
</product>
<product
platform="windows linux solaris-sparc solaris-x86 macosx-ppc macosx-x86 aix"
status="to-be-installed" uid="openesb" version="2.0.0.090514.0">
<properties>
<property name="installation.location">/opt/GlassFishESBv21/glassfish/addons/jbi-components
</property>
</properties>
</product>
<product
platform="windows linux solaris-sparc solaris-x86 macosx-ppc macosx-x86 aix"
status="to-be-installed" uid="jbicomponents" version="2.0.0.090515.0">
<properties>
<property name="installation.location">/opt/GlassFishESBv21/glassfish/addons/jbi-components
</property>
</properties>
</product>
</components>
</state>
This file contains all installation settings. For custom installation you have to change some properties such as Glassfish ESB server admin user, password, ports and many others.
The defined installation path is /opt/GlassFishESBv21/glassfish : this value can be change to your own path.
When you have finished with configuring state.xml, your working directory should contain two files: glassfishesb-v2.1-full-installer-linux.sh and state.xml :
root@glassfish:~ # ls
glassfishesb-v2.1-full-installer-linux.sh state.xmlTo install glassfish ESB 2.1 you need to specify the state file and add --silent option for a text mode installation:
root@glassfish:~ #sh glassfishesb-v2.1-full-installer-linux.sh --silent --state state.xmlBe patient until the installation process is complete :-)
When the installation complete successfully, start your Glassfish ESB v2.1 server by entering the following command:
root@glassfish:~ #/opt/GlassFishESBv21/glassfish/bin/asadmin start-appservWhen it starts, you can immediately check your Glassfish ESB server by accessing the web based administration console. Open the flowing URL http://your-server-ip:4848 using a web browser (Use the alternate URL if you have modified admin.port in state.xml) and wait some seconds until a login page appears (see the screenshot below).
If you're curious, you access to the admin console by providing the login and password (The default login is admin and password is adminadmin).

The server can be stopped by issuing this command:
root@glassfish:~ #/opt/GlassFishESBv21/glassfish/bin/asadmin stop-appserv2.3 Installing Netbeans 6.7.1 & SOA Plugin
1) Download Netbeans 6.7.1 from netbeans.org or directly from this link.2) Install using default options. [By default Netbeans doesn't include the SOA components, so you need to add them manually.]
3) Fire up Netbeans, and go to main menu Tools > Plugins. (This step is described in the following screenshot)

4) When the plugins dialog is opened, select "Available Plugins".
5) Type the keyword "soa" in the search text box located in the right-top.
6) Select the listed plugin as show below and click on install.
NOTICE: The plugin installation can takes several minutes depending on your Internet connection speed (about ~14MB to be downloaded).

When SOA plugin installation completes, the SOA component still not figured till you restart Netbeans. So,
1) Restart Netbeans 6.7.1.
2) Go to main menu File > New Project.
3) When "new project" dialog is opened, you should notice SOA in categories as shown in the screenshot below.

2.4 Adding GlassFish ESB 2.1 Server to Netbeans
As one of the most notable features of Netbeans that’s it support Glass Fish ESB server integration, while many administrative tasks can be performed within some mouse clicks such as server starting/stopping and applications' deployment/undeployment.To add GlassFish ESB 2.1 Server you have to:
1) Switch to Services tab then right-click on Servers > Add Server… as show in the screenshot below.

Be careful: Some values should be changed if you have previously customized your Glassfish ESB server configuration in state.xml
2) Select GlassFish 2.x and rename it to GF21ESBSERVER on (your-server.domain)

3) Choose "Register Local Default Domain" if GlassFish ESB 2.1 server was installed in the same host or "Register Remote Domain" if it was installed in a remote host, then click-on next.

4) In the case of remote host you should provide the server Host name or IP address, click-on next again.

5) Provide the User name and Password and click on finish.

After clicking finish your Glassfish ESB 2.1 Server should be now found when expanding Servers icon as shown below. Right click-on GlassFish ESB Server and discover the various functionalities that you can perform from Netbeans.

That's all for this first part of our tutorial, now we have:
- Glassfish ESB on a remote Linux server (headless mode)
- Netbeans with SOA Plugin
- Glassfish ESB integrated with the Netbeans IDE
Don't hesitate to take a look on our services and SOA products, we do offer many SOA related enterprise solutions using different technologies.



2011-02-17 09:54:41
is the Part 2 available ? Where cn i find a'well-down' tutorial about ESB and BPEL Tools ?