Java J2EE Portal
Enterprise Java Station
J2EE curve
Java News / Articles
Java News / Articles
Complementing Unit Test with Dependency Injection and Mock Objects
Logging on a shared Java hosting with java.util.logging
Java Cryptography : A Bird's Eye View
Processing...
Buy Java, Deals On Software Technology Store
Click here for great deals on computers, laptops, software and books
A Primer on Business Process Execution Language (BPEL) PDF Print
Written by Atul Kahate   
Aug 25, 2008 at 10:02 AM
Business Process Execution LanguageBPEL (Business Process Execution Language) is one of the new buzzwords thrown around with the same frequency as SOA (Service Oriented Architecture). Let us make an attempt to dismantle this jargon and try and understand the context and usage of this term.

BPEL talks about business processes. Hence, we first need to take a look at this term. It actually means what we think about this term. It is some work that we need to carry out (e.g. transfer money between two accounts, or purchase goods, or generate invoice). Usually, it is composed of a sequence of steps or actions in a specific order. When all the steps are completed successfully, the business process is considered to be complete and successful as as whole. A business process is rarely all-automated, and is usually a mixture of automated steps plus human interventions. Also, it can involve interactions with various other applications/systems inside the organization, or even outside. Hence, usually some sort of integration-related requirements are a part of any business process.

Now, what if we can describe a business processes in a language of its own? Better yet, what if we can implement it as a service (usually a Web service)? That is where we start moving from a business process to BPEL. If we can create a service that spans across all the steps necessary to complete the objectives of the business process, we would provide the technology support for implementing this as well. Hence, we can consider BPEL as a language that allows us to combine multiple small services (called as fine-grained services in the jargon) to create a big service that implements our business process (called as coarse-grained service in the jargon), in the right sequence.

BPEL, like anything else, these days, is based on XML. It is a part of the Web Services specifications. It allows us to define, carry out (i.e. orchestrate in the jargon), and manage business processes. The business processes themselves, as mentioned earlier, are implemented as Web services in the most common form. Therefore, we can crudely define BPEL also as a language that arranges one Web service after the other in a well-defined sequence, and gets some useful work done out from it (which we call as a business process).

The whole idea here is that non-technical people should be able to create and describe business processes. For taking the idea further, most BPEL development environments provide intuitive IDEs that are almost completely GUI-driven. This means that business analysts can not only elicit and describe requirements in plain English, but then can actually draw the flow of events as it is supposed to happen (e.g. Receive account numbers and amount -> Validate accounts -> Perform funds transfer -> On success, return ‘Success’ message, but on failure, return ‘Error’ message) using ready-made icons. Then how is this different from the use cases and sequence diagrams in UML? Well, the idea is quite similar in concept. However, the difference is that BPEL is closely tied to the SOA/Web services buzz (instead of the object orientation buzz), and secondly BPEL diagrams generate code in XML-like syntax (unlike the Java/C++ syntax as in the case of UML).

BPEL Case Study

We have discussed the English-like description of a funds transfer process earlier. Let us now see how a typical BPEL workflow would look like in the diagrammatic fashion, and also how the syntactical version would look like.

This is how the BPEL workflow would conceptually look like, when drawn in an IDE.

From a syntactical point of view, the above BPEL diagram would translate into the following XML (in a crude translation, done only for conceptual understanding):

<process>
   <receive createInstance="yes" />
   <invoke name=”validateAccounts”  />
   <switch>
     <case status=”invalid”>
     </case>
     <case status=”valid”>
       <invoke name="transferFunds" />
     </case>
   </switch>
   <reply variable="status" />
</process>

We can see that the BPEL process starts with a process element. It has one or more activities. We can invoke other services using the invoke element. Variables can be defined, conditional code can be written, and so on. What is not shown is that even loops can be written using the while construct. Similar to Java’s try-catch-finally, we have faultHandlers-catch-catchAll blocks here. Event handlers can be specified so that we can write event-based logic.

All in all, we can see that BPEL is a diagrammatic way of describing business processes, and generating XML in the background without having to write a lot of code to achieve the same thing. Of course, the actual backend business logic still needs to be written in some form or the other. But this is abstracted out in a better manner, and is standardized, using BPEL.

About the author : Atul Kahate is Head – Technology Practice, Oracle Financial Services Consulting (formerly i-flex solutions limited). He has authored 16 books on Information Technology, 2 on cricket, and over 1500 articles on both of these in various newspapers/journals. His site can be visited at www.atulkahate.com and he can be reached via email at .

Related:
* Understanding Web Services and SOA
* Apache Axis - Web Services For Human Beings
* Apache Axis2 Offers Next Generation Web Services


User Comments
Your Name / Email Address
Comment
Spam Protection - Please enter the code in the image -

Listen to code


Add This Feed Button

Enter your Email

IndicThreads.com Conference On Java Technology, Pune, India
Java Expert Interviews
MarkSchiefelbein-BackbaseAjaxFramework
All Ajax development can happen serverside using the Backbase framework and JSF
PatrickLightBodyWebWork
Struts Action Framework 2.0 should be released by August 2006
GraemeRocher-Grails
Grails is a breath of fresh air for Java developers
Processing...
Go to top of page  Home |
SiteMap

Copyright 2004 to 2008 Rightrix Solutions. All rights reserved. All product names are trademarks of their respective companies. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Rightrix Solutions and IndicThreads.com are independent of Sun Microsystems, Inc.

Views expressed at IndicThreads.com reflect the views of the authors alone, and do not necessarily reflect those of IndicThreads.com. IndicThreads.com and it's authors are not responsible for reader comments and opinions.

Enterprise Java J2EE JEE Portal >> IndicThreads.com