R12
  • Register

Oracle Gold Partners, training schedule is listed here designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

Fusion Apps Linkedin  |  Like us on Facebook  |  Get notified for our new articles  |  Twitter  | Linkedin Page | YouTube

 

User Rating: 5 / 5

Star activeStar activeStar activeStar activeStar active
 

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   

0 #1 Tapash 2007-01-11 00:00
Brilliant, Wish Oracle could provide something like this.
Thanks
Tapash
Quote
0 #2 Tapash 2007-01-11 00:00
Brilliant, Wish Oracle could provide something like this.
Thanks
Tapash
Quote
0 #3 Anil Passi 2007-01-12 00:00
.
.
.
Hi Sri,

I will try to work upon your suggestion

T hanks
Anil
Quote
0 #4 Sri 2007-01-12 00:00
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
Quote
0 #5 Anil Passi 2007-01-12 00:00
.
.
.
Hi Sri,

I will try to work upon your suggestion

T hanks
Anil
Quote
0 #6 Sri 2007-01-12 00:00
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
Quote
0 #7 Santosh Desai 2007-03-05 00:00
Anil,
what exactly is BPEL, i believe im able to co relate this to workflow.
plea se clarify.

Tha nk you
Quote
0 #8 Anil Passi 2007-03-06 00:00
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.

Tha nks,
Anil
Quote
0 #9 Sekar 2007-03-13 00:00
Hi Anil,

What are the pre-requisites to learn BPEL?

Thanks ,
Sekar.
Quote
0 #10 reddy 2007-04-04 00:00
I have a jsp page.How can i link the JSP page to the BPEL process
Quote
0 #11 Malladi 2007-08-20 22:31
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)
Quote
0 #12 Malladi 2007-08-20 22:42
would be even better if you can explain the following sample provided by oracle.

link: http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28351/T430238T430303.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?
Quote
0 #13 Harshad 2007-10-18 16:13
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_AP I. We are facing some error messages.
Quote
0 #14 koutamnaresh 2007-10-30 10:39
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?

Th anks,
Naresh
Quote
0 #15 Rajesh.S 2007-12-03 14:04
Hi Anil,

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

Thank s,
Rajesh
Quote
0 #16 Anil Passi 2007-12-03 22:13
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,
A nil Passi
Quote

Add comment


Security code
Refresh

About Apps2Fusion

Apps2Fusion are passionate about training. Trainnig is our core business and we have been doing this for many many years. We thrive to meet expectations of our trainees. We work hard to ensure trainees get the right courses sold to them, with advise for their career paths. We have helped many consultants in past with training & mentoring and  we have helped them achieve great heights. We could help you as well. Get in touch with us.