Wednesday, December 14, 2011

BPEL - Extensions


WS-BPEL 2.0 supports custom variable assignment mechanisms (Extensible Assign Operations) and user-defined activities (Extension Activities). To use these features, WS-BPEL provides two explicit extension constructs <extensionAssignOperation> and <extensionActivity>.

In order to use BPEL extensions, Extensions must be declared in the BPEL process model. It tells to the BPEL engine which extensions must be available and which are optional. Extension declaration can be done by adding an <extension …> element to the BPEL process model as follows.

            <bpel:extension namespace="#extension-namespace#"
<bpel:extension namespace="#another-extension-namespace#"

Extensible Assign Operations

Extensible Assign Operation allows including extensible data manipulation operations defined as extension elements under namespaces different from the WS-BPEL namespace. If the element contained within the extensionAssignOperation element is not recognized by the BPEL engine and is not subject to a mustUnderstand="yes" requirement from an extension declaration then the extensionAssignOperation operation MUST be ignored.

It is structured as follows.

<assign validate="yes|no"? standard-attributes>

E4X expressions can be used in Extensible Assign Operations. Following code snippet will show you how to define an ExtensionAssignOperation using E4X expressions..

<bpel:assign name="AssignE4X">
<js:snippet xmlns:js="">

The snippet element declares the given extension namespace and it contains the E4X expressions.

Extension Activity

extensionActivity is a mechanism defined in WS-BPEL 2.0, that allows to define new activities, which are not defined by WS-BPEL 2.0 specification.  You can define new activity by placing them inside the <extensionActivity> element.

According to the Specification <extensionActivity> should have a single element, which is qualified with a namespace different from WS-BPEL namespace.  If the element contained within the <extensionActivity> element is not recognized by the WS-BPEL processor and is not subject to a mustUnderstand="yes" requirement from an extension declaration then the unknown activity MUST be treated as if it were an <empty> activity that has the standard-attributes and standard-elements of the unrecognized element; all its other attributes and child elements are ignored.  

(Read full BPEL specification about ExtensionActivity)

ExtenisionActivity structured as follows,

<anyElementQName standard-attributes>

Tuesday, December 6, 2011

How to setup a WiFi-HotSpot using your laptop ?

Do you know How to setup a WiFi-HotSpot using your laptop and share your Internet connection to new WiFi-HotSpot ?

If not, follow this tutorial :


Tuesday, September 6, 2011

Remote debugging problem (Tomcat): "Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options"

 Hi all,

Today I tried to remotely debug the Apache ODE source using Apache Tomcat 7 and Intellij IDEA. If you are interested in remotely debug,  follow this tutorial


I tried it in windows 7. But i was unable to halt the Tomcat's the catalina script at ODE deployment. So i tried to set following windows environment variables (given by IDEA, and modified as suspend=y) for JAVA_OPTS using, 

set JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000

and then tried to run catalina script by running,

catalina.bat jpda run

Then I got this;

ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options.
Error occurred during initialization of VM
agent library failed to init: jdwp

Why ? and Solution

Then I googled about this problem and found the error: when i am going to define both JPDA and environment variables at ones, it cause to generate two instance of debugger and that is not possible. By removing one of them will solve the problem.

So I tried it again removing jpda parameter, and finally I was able to halt the catalina script without ODE deployment.


JPDA stands for The Java Platform Debugger Architecture. which is a collection of APIs to debug Java code. (see )

Thursday, June 9, 2011


The WS-BPEL stands for Web Services Business Process Execution Language. It is an XML-based language for formally describing business processes and business interaction protocols.

WS-BPEL 2.0 was approved as an OASIS Standard in April 2007. It defines a model and a grammar for describing the behavior of a business process based on interactions between the process and its partners. The interaction with each partner occurs through Web services interfaces. The WS-BPEL process defines how multiple service interactions with these partners are coordinated to achieve a business goal, as well as the state and the logic necessary for this coordination.

Read more:
You can Find the BPEL specification at 

In one of my Next Post, I am going to describe some key concepts in BPEL.

Wednesday, June 8, 2011

Developing WS-BPEL Processes using WSO2 Carbon Studio.

Business Process Execution Language or WS-BPEL lets people orchestrate tasks and activities exposed as Web services. WSO2 Business Process Server can execute process descriptions written in WS-BPEL. Since BPEL is structured and based on XML, it is now far easier for business users to model and execute business processes using open source graphical tools like Eclipse BPEL Designer. This tutorial describes how to Develop a WS-BPEL Processes using WSO2 Carbon Studio.

Read full tutorial at: 

Monday, May 16, 2011

Creating a “Document Root” directory in Home directory on Ubuntu. ( Part 2 )

 ~*~ From the Part 1 ~*~

Make user that you have installed php5 in your system. If not execute following commands in terminal.

 sudo apt-get install php5  
 sudo a2enmod php5  

first line install the php5 and second line enables PHP in apache server. Then restart apache using,

 sudo /etc/init.d/apache2 restart  

At this point, Apache and PHP are installed and ready to go.

I’m using ubuntu lucid distribution,
A recent update to the Lucid distribution, however, requires a slight change to /etc/apache2/mods-available/php5.conf to re-enable interpretation in users' home directories, but previous distributions do not require this change.

Open give file using your favorite text editor. Here I am using gedit.

 sudo gedit /etc/apache2/mods-available/php5.conf  

Comment out (or remove) the following lines:
 <ifmodule mod_userdir.c="">  
     <directory *="" home="" public_html="">  
       php_admin_value engine Off  

After doing this change, restart apache using,
 sudo /etc/init.d/apache2 restart  

At this point, PHP should be successfully installed and working.

But this method will enable PHP for all user directories. For security reason this method is not a good practice. One thing can do is enable only for one user directory. To do this, follow this procedure.

Do not edit /etc/apache2/mods-available/php5.conf file and create a file (as root) called /etc/apache2/conf.d/php-in-homedirs.conf with the following contents:
 <ifmodule mod_userdir.c="">  
     <directory $username="" home="" public_html="">  
       php_admin_value engine On  

Simply replace the $USERNAME with the user name of the user you wish to allow PHP access to. Also note that the <directory> section may be repeated as many times as is necessary. Save the file, and restart Apache with a

 sudo /etc/init.d/apache2 restart  

And PHP should only be enabled for the users listed in this file.

~*~ End of Tutorial ~*~

Saturday, May 7, 2011

Creating a “Document Root” directory in Home directory on Ubuntu. ( Part 1 )


Generally Apache HTTP web server's document root is /var/www on Ubuntu/Debian Linux environment. (You can find the Document Root directive in /etc/apache2/sites-enabled/000-default.)

But in this post I am going to tell you how to create a document Root directory under your Home directory. This directory can be used same as /var/www directory. 


Since this directory is in your home directory you do not need to worry about permission issues. Also this might help for normal desktop user as well as web site developers to run/test their web sites or applications.

Here I’m using Apache Module userdir ( to do this. Mooshak is a one of web based tool that uses this Apache userdir.

Tested Environment:

Ubuntu 10.10
Apache 2.2.17

Step1: Installing Apache2 and PHP5

First we need to install apache2 and php5 in your machine. If they are already installed ignore this step.

Open Linux terminal and type;
 $sudo apt-get install apache2 php5  

If you want to make sure that, apache2 is installed correctly; open a web browser and go to link http://localhost/ . If page get loaded correctly with saying it's working, that means you have installed apache2 correctly.

Also you can check the PHP installation using the terminal, just type in the terminal 

 $php -version  
 If it is correctly installed, you can see the installed version PHP in terminal.

Step 2: Creating a directory “public_html”

Create a directory under home directory called “public_html”. Here we are going to use this directory store our web pages.  Use any GUI base tool (file browser) or terminal for this. It doesn't matter. But do not use sudo command for this.

In terminal fist go in to your home directory and type  

 $mkdir public_html  

Step 3: Enable Apache module userdir

Here we are enabling an Apache module, called userdir.

You can find the available apache module under, /etc/apache2/mods-available/ .  
Also you can find the module enabled under /etc/apache2/mods-enabled/.   

To enable module userdir, type in terminal;

 $a2enmod userdir  

Another Way:
This is an alternative way to do same thing. That is symlink /etc/apache2/mods-available/userdir.load and /etc/apache2/mods-available/userdir.conf files to /etc/apache2/mods-enabled/ directory.
To do this, type in terminal;

 $cd /etc/apache2/mods-enabled/  
 $sudo ln -s ../mods-available/userdir.conf userdir.conf  
 $sudo ln -s ../mods-available/userdir.load userdir.load  

Restart Apache2 to enable userdir module.

 $sudo /etc/init.d/apache2 restart   

Congratulation, now you have enabled public_html document root directory in your machine. Note that you can access your websites in your home directory by a URL in the form http://localhost/~USER_NAME. For example if your user account name is USER, then you can access your website(s) in your public_html  directory via, http://localhost/~USER.

Testing the public_html directory using a sample html.

Open your favorite text editor, type  

     <h1>Hello World&lt;/h1>  
     <p>This is the default web page for your user directory.</p>  

Then save it as index.html in public_html directory.

Then open your browser and enter URL of the your user directory.  You can see the web page that we have created.

In Next Tutorial > How to enable PHP support in public_html 

~*~ goto Part 2 ~*~

Wednesday, May 4, 2011

Welcome To the "Try it Now" Blog

Welcome to Try it Now
Hi, I am Hasitha Aravinda from Sri Lanka. This is my second blog, which is completely dedicated for Computer Science Stuffs. I hope to share my knowledge, personal experience with you using this blog. 

Please Read my Blog posts and try it yourself. Let me know when you success or fail and give me your Feedback/suggestions (both good and bad ) . Those things will encourage me to blog new things.


Also Remember that I take no responsibility,  damage of your any physical devices or anything bad (e.g. crashes, loss of data, any damage) that may happen if you use the information or code in this Blog.

Don't afraid. I'll do my best to make sure bugs are fixed and that the content is as accurate as possible. In short, have some common sense and use this at your own risk.  :)

Happy Coding....