BPEL Tutorial For Beginners With Helloworld Example
BPEL Tutorial For Beginners With Helloworld Example
After reading this article you will be able to understand the following
things:
What is SOA?
What is BPEL?
Difference between SOA and BPEL
Advantages of SOA/BPEL
Download SOA Suite
“Hello World/ErpSchools” Tutorial in BPEL
Compile and deploy BPEL Suitcase using bplec.bat
Monitor the activities/instances/statuses in Dashboard
What is SOA?
SOA stands for “Service Oriented Architecture”. SOA is an architectural
approach using technology to present business processes as reusable
services. SOA is focused on the business and enables process
transformation to new levels of integration, visualization, monitoring, and
optimization.SOA is not a technology, it is a concept and a strategy for
using technologies to build business automation solutions. SOA can be
achieved through web services like BPEL.
What is BPEL?
BPEL stands for “Business Process Engineering Language”. BPEL is a
technology used to build programs in SOA architecture.
Difference between SOA and BPEL
SOA is an architecture and not a technology. BPEL is a technology to build
SOA architectural programs.
Advantages of SOA architecture and BPEL technology
Click OK. Now “BPEL Project Creation Wizard” will open as shown below
Enter the name: erpschools_process
Name Space: Leave it as default
Template: Synchronous BPEL Process
Click Next
Leave the default values and click Finish
Now you will see a screen like this
Now on the right side tab you can see the “Assign” icon in the component
pallet
Select it and drag into the diagram. When you drag you will see green
circles representing where you can drop the Assign component. I will drop
between “Receive Input” and “Reply output” as shown below
In “General” tab you can change the Name or you can leave the default
Next Click on “Copy Operation”
And select “Create” drop down as show below
Now you will see “Create Copy Operation” box with From and To tabs
Now manually enter the parameters for that concat() function as shown
Enter the welcome message as shown and place the cursor immediately
after the comma
In the BPEL Variables select the Clinet:Input variable and double click it.
It will automatically insert the path on the top
Click OK.
Now click OK
Now select “Application Server” and right click to select “New Application
Server Connection”
You get to see the below screen
Now go to Test tab and click “Test Connection”. If you get “Success”
message you are good to move forward if not go back and check the
ports and hostname e.t.c
Click OK
If you expand the “application Server” in the left panel you will see the
directory structure as follows
“Connection”
Now select the Application Server that we created in the previous step.
Click on “Test Connection” tab
Click “Test Connection” button
You get a message in the bottom of the screen saying success or fail. If
success everything is good if not you can deploy through another method.
It can fail for many reasons it depends on your browser settings, windows
settings, ports, permissions e.t.c
Deploy and create BPEL Suitcase
Go to Developer Prompt
Click Programs >> BPEL >> Oracle BPEL Process Manager >> Developer
Prompt
It will open a command prompt and will take you to “samples” directory
Cd ..
Cd bin
Now type
Bpelc.bat “path of your bpel.xml file in your application folder”
In the first step while creating the new application we have the path
“C:\product\10.1.3.1\OracleAS_2\bpel\samples\Prudhvi\Application1″
So navigate to that folder and then click the process folder here it will be
erpschools_process and then to bpel directory
Final path will be
“C:\product\10.1.3.1\OracleAS_2\bpel\samples\Prudhvi\Application1\erps
chools_process\bpel\bpel.xml”
Execute the below command in the developer prompt(in cmd prompt)
Bpel.bat
C:\product\10.1.3.1\OracleAS_2\bpel\samples\Prudhvi\Application1\erpsc
hools_process\bpel\bpel.xml
In the Left panel you can see all the BPEL processes you have deployed
till now.
To deploy our new process click on “BPEL Processes” tab on the top
Click Browse and select the BPEL Suitcase that we created using bplec.bat
previously
Now click “Deploy” button.
If you get a successful message as shown below your BPEL process is
deployed successfully.
Click Done.
Monitor BPEL Process
Now I can see my BPEL process which is erpschools_process in the BPEL
Processes list
This is exactly what you see in JDeveloper when you built it.
Click Audit tab
Here you can see what are all the activities that you are performing in
your process.
In this process we are receiving the input and copying input to output
variable and then replying the output.
If you click the “View Raw XML”
Here you can see the xml code for both input variable and also output
variable
Now click on “Instances” tab on the top
It will show all the instances that the process has gone through.
Let me explain this using an example. Suppose you have a BPEL process
names “Load Sales Orders BPEL Process” to load “Sales orders” in order
management. If you are importing one by one sales order through this
process then you will have one separate instance for every sales order. If
you get error while importing sales order#3 that particular instance will
show that error.
Finally click on the tab “Activities” on the top
Here you can see all the activities that are performed for all the
processes. Instance id is unique for each process. It is similar to “item
key” in workflow.