Tuesday, December 17, 2013

What is bpel

Overview

This post describe some basic concepts of BPEL which is a XML based language used to model business processes.

What is BPEL

BPEL (Business Process Execution Language ) used to model business processes work flows using XML based tags.Main purpose of BPEL is to divide the business work flow and business logic. Rather than using bulky codes and develop complex applications you can expose business operations as services and model business logic using BPEL tags. Web Services Business Process Execution Language (WS-BPEL) is an standard executable language defined by OASIS organization for develop business processes with web services.

What is Business Process

Business Process is a set of activities that perform a specific task. As an example pizza order can be described as simple business process.

When you order pizza to your home it has set of activities. First thing is there should be a working number of a pizza shop(BPEL service).You call the pizza shop,Tell what kind of pizza you want,provide other appropriate information. Then Pizza shop reception will tell it to kitchen to make your pizza and tell available delivery boy to deliver your pizza(Internal services). If pizza shop run out from material they will get materials from store(External Service). Finally delivery boy will give the pizza after you pay the amount. this is the work flow of the order business process.
But there are some calculations  and logic associate with order process like calculate sub total, generate route for delivery boy etc. They can be described as business logic.
In BPEL we model business workflow as BPEL process and business logic will be expose as web services. This services will be link by the BPEL which is called partner links.

Why we need BPEL than calling Web Services

Think your business process required to call large no of web services. You can develop java application with generating clients and call them when required. But when you need to implement many business processes with large set of web services(some may repeat) life become severe.

Long running processes need to store the state and sending different messages to same instance may become complex. But when you are using BPEL to model your business processes you can simply make links to web service and calling and management of processes will be handled by BPEL engine. You can model your business process easily with BPEL.

Once you develop BPEL process it will also expose as web service just like pizza shop number. BPEL model will be saved XML based document with  .bpel extension . Some WSDL files will also include with .bpel file as follows. Finally all these files will be exported as zip file.

BPEL Engine

BPEL engine will read business process zip and process each element of .bpel file. BPEL process will be expose as service to be called by client. So BPEL engine will expose and listen to web services, sending and receiving messages, manage data and  recover errors based on your process definition.Once client called service request will be processed and responses will be provided based on deployed business process. Apache ODE is open source BPEL engine.

Business process server will include additional capabilities like user ,process and View management with BPEL engine. WSO2 BPS server is a open source business process server runs on Apache ODE engine.

Designing BPEL model

BPEL contains different elements like Actions(Reply,Receive,assign) Control(For loop,While,If) and more. As an example you can call web service based on if condition or inside looping structure. There are BPEL designer tool set available  and you can just drag and drop those UI elements to your model.
WSO2 Developer studio comes up with Eclipse BPEL Designer plugin So you can just used UI Palette widgets to model Business Processes .

Next...

In next post I will describe how to develop simple business process using Developer studio and deploy it on WSO2 BPS server.


No comments :

Post a Comment