Take control with WS-BPEL

Page: 1 2 3 4 5 6 7 December 11th, 2009 by Henri Bezemer

The example: open a bank account

I will use a process to open an account for a new customers with an imaginary bank as an example application of WS-BPEL. This process is operated by a business department called the front-office, and it has three partners. The first partner is the new customer who wants to sign up. The second partner is a commercial packaged CRM application. The CRM application will be used to store basic information about the new customer. The third partner is a legacy back-office system, which keeps track of all customer accounts and their financial transactions. The interactions between partners that take place during the process are shown in a sequence diagram:


BPEL example

An explanation of the diagram:

Step 1. A new customer signs up at the bank’s Internet site by filling out his/her name, address and email address. The internet site then makes a call on behalf of the customer to a front-office web service (running in the BPEL engine). When the BPEL engine receives the call, it kicks of a new process instance. Note that I didn’t include the web interface in the example code. Instead, use a generic web service test tool like the excellent Eclipse Web Service Explorer, to make the initial web service call.

Step 2 to 4.2. The BPEL process makes three synchronous web service calls to the CRM system. These calls are needed to store the customer’s personal data in the CRM system. This demonstrates how WS-BPEL provides a compound web service, making calls to basic web services. As a side effect of the last call (addEmail), the CRM system sends out an email to the customer’s provided email address, with a requests to click on an embedded hyperlink (message 4.2 in the diagram). This will be a simple assurance that this email address is correct and belongs to the customer (this functionality is not included in the example code – I hate email functionality in demo’s as you often end up sending unintended emails to friends ;-) ). The complete CRM system example code (EJB 3.0) was provided in a previous post. If you want to build the WS-BPEL example, you have to get the EJB 3 JAX-WS example component up and running first

Step 5. In the next minute or maybe a month later, the customer clicks on the link in the email. This invokes a JEE servlet in the CRM system, which in turn makes a callback to the BPEL process. This step clearly requires the use of WS-BPEL correlation. Note by the way that this step is an example of human interaction with a WS-BPEL process.

4. There is now some (but not a lot!) trust that the customer is who he or she claims to be. Finally the BPEL process makes a call to the back-end system in order to create a bank account.

From a functional perspective, this process ends a bit premature. It is really an oversimplification of a rather complex business process, but I think it still demonstrates the business value of WS-BPEL quite well and it allows me to present the cool technical tidbits in the next parts of this posts.

In the next part I’ll tell you a bit more about the WS-BPEL engine that I choose to use to develop and run this example.

Previous pageNext page

One Comment

December 15, 2009 at 11:12 am BPEL_evaluator


Thanks for the example. I now heve a better understanding of correlation Keep up th good work!