Skip to content

Green

color

Default screen resolution  Wide screen resolution  Increase font size  Decrease font size  Default font size  Skip to content Default color Pink color Green color Green color
Home arrow Technical Articles arrow Fusion arrow BPEL HelloWorld
This website has now moved to http://apps2fusion.com





BPEL HelloWorld | Print |  E-mail
Written by Anil Passi   
Monday, 08 January 2007
In this article, I will show quickly how to do a HelloWorld program in BPEL. Of course this example will be kept very simple.

Why this example?
To show you how to create a BPEL Project
To show you how to deploy and test the BPEL Project
To explain the basic components of a BPEL Project
Explain why Oracle designed BPEL/ESB in this manner, and its benefits


Will all the above be covered in this specific article?
To keep things simple, I will split the above listed tasks into streamlined but concise articles.


What this article will not include
a. This will simply show you step by step approach for creating HelloWorld.
b. Testing steps will be explained in a future article
c. I will explain the internals of these BPEL components in a latter article.
d. Invocation of a third party web service. I will cover this latter.
e. Concepts of ESB for example Message Transformation, Rules based routing etc.
f. Database related transactions/flows


Pre-Requisites
I hope that you have already read and implemented article Connecting jDeveloper to SOA Servers.


What is the scenario painted by this article?
1. Each default BPEL Process has two variables in addition to having a receiveInput[start] and replyOutput[end]
The two variables are input and output[result]
2. We will add two stages to this Synchronous process
3. Stage 1 will Alter the value of input variable itself by concatenating text Hello From Anil Passi to .
4. Stage 2 will assign the value in input variable to the output variable


Lets get started with steps for BPEL HelloWorld

Step 1. Select Application Navigator Tab and right click on Applications to create a new Application. Give it any name you desire.
Step 2. Right click on that Application and create New Project of type BPEL Process Project. Give it a name HelloPassiWorld
Important:- Make sure that the template is Synchronous BPEL Process

Step 3. Click on Next, accept all defaults and click on Finish.
Step 4. You will now see a default flow created.
In the right hand side top of the window, select "Process Activities"


Step 5. Click on Assign within Process Activities. Drag it between receiveInput and replyOutput.
Do this step twice. Your flow will look as below.


Step 6. Double-click on Assign_1. A window will pop-up. Select tab Copy Operation, then click on Create and then click on Copy Operation again.
You will see another window pop-up with title Create Copy Operation.
It has two sections From and To.
Step 7. In the From section, select Expression and hit control-space. Select concat


Step 8.
Enter text as below, and navigate cursor to after comma and hit Control Space again.



Step 9. Select bpws:getVariableData with 3 input parameters.

Keep on hitting Control Space and keep selecting default values for parameters to concat method.
Step 10. In Right hand side, select Variable and expand the section to select client:input.
Step 11. Click on OK and Apply and again OK.
Step 12. DoubleClick on Stage_2 this time. and again use Create Copy Operation.
Step 13. Assign the Input Variable to the Output Variable. Note that we have modified the value of the input variable.


Step 10. Click on OK and OK again and save the project.
Step 11. Right click on the project and select Rebuild

You should receive something similar to below text in Message tab[once rebuild is completed]
Compiling C:\jdev\jdev\mywork\Application2\HelloPassiWorld\bpel\HelloPassiWorld.bpel
BPEL suitcase generated in: C:\jdev\jdev\mywork\Application2\HelloPassiWorld\output\bpel_HelloPassiWorld_v2007_01_08__3624.jar
  copying bpel/HelloPassiWorld.wsdl to output directory
  converting, through native2ascii, build.properties to output directory
[01:01:28] Successful compilation: 0 errors, 0 warnings.

Step 12.
Right click on the project and Deploy it to the BPEL Server as below.


Deploying to http://localhost:8888 domain: default. Please wait....
[1:10:15 AM] Please check Ant log to determine whether the project deployed successfully.

Ant Log is
--------------------------------------------------------------
| Deploying decision services for HelloPassiWorld on localhost, port 8888
--------------------------------------------------------------
[deployDecisionServices] There are no decision services to deploy
BUILD SUCCESSFUL
Total time: 2 minutes 16 seconds



This completes your HelloWorld Project in BPEL.
In the next article I will be explaining how to test this project.

Comments (16)add
...
written by Tapash , January 11, 2007
Brilliant, Wish Oracle could provide something like this.
Thanks
Tapash
...
written by Tapash , January 11, 2007
Brilliant, Wish Oracle could provide something like this.
Thanks
Tapash
...
written by Anil Passi , January 12, 2007
.
.
.
Hi Sri,

I will try to work upon your suggestion

Thanks
Anil
...
written by Sri , January 12, 2007
Hi Anil,

The hot topic of SOA is really exciting. Having studied your Workflow training sessions , BPEL training is not really tough.
But can you provide some of the sessions in video format , so that its easy to grasp the concept and relate to the topic.

Thank you,
Sri
...
written by Anil Passi , January 12, 2007
.
.
.
Hi Sri,

I will try to work upon your suggestion

Thanks
Anil
...
written by Sri , January 12, 2007
Hi Anil,

The hot topic of SOA is really exciting. Having studied your Workflow training sessions , BPEL training is not really tough.
But can you provide some of the sessions in video format , so that its easy to grasp the concept and relate to the topic.

Thank you,
Sri
...
written by Santosh Desai , March 05, 2007
Anil,
what exactly is BPEL, i believe im able to co relate this to workflow.
please clarify.

Thank you
...
written by Anil Passi , March 06, 2007
Hi Santosh

BPEL is a tool, based on Open Standards, whereby you can implement a flow which is similar to workflows. Additional Benefits are that BPEL evolved on SOA Concepts. Lets assume you have apply for immigration to a country. Their system needs to do following checks
1. Your criminal history in country of origin and also in destination country
2. Your credit history
3. Your critical medical condition

In ideal world, when every such check is service enabled, you will then be able to make a Flow in BPEL which will go to each of those services and get the status. The idea is quick decesions, non-paper based checks[despite dealing with third parties].This is called service orchestrations, for which BPEL specifications are being evolved.

Thanks,
Anil
...
written by Sekar , March 13, 2007
Hi Anil,

What are the pre-requisites to learn BPEL?

Thanks,
Sekar.
...
written by reddy , April 04, 2007
I have a jsp page.How can i link the JSP page to the BPEL process
...
written by Malladi , August 20, 2007
Hi Anil
Brilliant work!!
I just started learning BPEL. i have seen some examples which oracle provided. few questions:
1. is there a basic structure for BPEL like receive..assign..invoke..?
2. what is transformation activity? are assign and tranform activity same?
3. wokring on BPEL to what extent should we have XML understanding
4. do we really make changes in wsdl files or everything can be handled through Jdeveloper (like adding elements etc)

would be great if u explain taking a more complex example (involving more than 1 partner link)


...
written by Malladi , August 20, 2007
would be even better if you can explain the following sample provided by oracle.

link: http://download-uk.oracle.com/...430303.htm

could not quite understand the 'Configuring the Transform Activity' step

in the example if the transform activity is used between recieve and invoke, can the source be from the callbackClient and target be Invoke activity. is the sequence right?
Handling BLOB in BPEL
written by Harshad , October 18, 2007
Hi Anil,
I have been following your articles closely and thanks for your site simple and so helpful. Do you know if there is special way of handling BLOB in BPEL. We are trying to create a document which will come as a parameter to a BPEL web service and we need to upload that document using IRC_DOCUMENT_API. We are facing some error messages.
Oracle ESB -- transformation limitations and handling special characters
written by koutamnaresh , October 30, 2007
Hi Anil,

It would be great if you could provide me with limitations of Oracle ESB while transformation. And would like to know how ESB transformation would handle special characters?

Thanks,
Naresh
Consultant
written by Rajesh.S , December 03, 2007
Hi Anil,

Your hardwork is really helpful to people like me. I am expecting some more about ESB and BPEL. Really it is helpful.

Thanks,
Rajesh
...
written by Anil Passi , December 03, 2007
Hi Rajesh,

Thanks for your kind words.
I do wish to publish tutorials on BPEL and ESB.
However these tutorials will be so lengthy that it will take me ages to prepare.
I am quite busy during December, following which I will consider making online video demo's for learning SOA.

Cheers,
Anil Passi
You must be logged in to a comment. Please register if you do not have an account yet.

busy