Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Customer order Business Process View

Customer calls in

Identify customer

Record order

Create product

Ship product

Send bill

BPM Tool and Engine Service View

Basic data service

Basic data service

Basic data service

Basic data service

Basic data service

Basic data service

CRM

Order and logistics

Billing

F I G U R E 7 - 6 . Modeling with a tool such as ActiveBPEL

7.4.2

BPEL

The Business Process Execution Language plays a fundamental role in modeling and running business processes in tools and engines. BPEL has such momentum in the SOA movement that it is rapidly becoming the standard for designing and running business processes. Conceptually, BPEL is an XML language for describing business flows and sequences, which in themselves are services. Language elements provide the ability to call services, process responses, and deal with process variables, control structures (including timers), and errors (including compensation). BPEL was initially designed by IBM, Microsoft, and BEA as a combination of IBMs Web Services Flow Language (WSFL, see [WSFL]) and XLANG, a notation for the automation of business processes based on Web Services. Nowadays, OASIS is specifying the standard (see [WS-BPEL] for details). A simple BPEL file might look as follows:
<?xml version="1.0"?> <process name="changeAddress" ...> <variables> <variable messageType="..." name="..."> </variables> <flow> <receive .../> <! for this request (operation and input) --> <invoke .../> <! call other service -->

7.4 BUSINESS PROCESS MODELING

89

<assign .../> <reply .../> </flow> </process>

<! map data --> <! return data -->

The whole <process> is provided as a Web Service that consists of different operations. Roughly, the XML file is organized as follows: The <variables> section allows you to define process variables. Similarly, you can define error handlers and links to other services. Next, you define a top-level activity, which usually is a <sequence> (an ordered collection of subactivities to be performed sequentially) or a <flow> (which defines one or more subactivities to be performed concurrently). A <receive> activity is usually the beginning of an operation. It defines the operation name and input data. Various activities then define the process. These activities include calling other services with <invoke> and mapping and assigning data with <assign>. Finally, a <reply> activity allows you to end the process and return output data. Although in principle BPEL is human-readable, reading and writing BPEL files manually is tedious and error-prone. Usually, you should use a BPEL tool to design and execute a process. Note that BPEL does not standardize the notation, so BPEL processes might look very different in different tools and engines. However, the behavior of a BPEL process should be standardized in such a way that it doesnt matter which tool it gets edited in or which engine executes it. The full name of BPEL was initially BPEL4WS, before it was renamed WS-BPEL (following the usual Web Services naming conventions). It follows Web Services conventions because the processes (which can just be composed services) it is used to create are provided as Web Services. So, to call these processes or services, which might themselves be called by other processes or services, you have to be able to call Web Services (which are technically provided inside BPEL engines). This raises the question of whether this business process modeling standard is usable only for Web Services technologies. The answer is no. There are two parts to the processes and services composed as BPEL XML files: one describes the structure of the business process, and the other defines a binding of this structure to concrete technical operations that are invoked or used. A standard binding to Web Services is provided, but you can use other bindings. This means that, in practice, you can compose processes and services that use different middleware and even native technologies such as J2EE calls (its no surprise that the Oracle BPEL tool provides direct support for using database queries as basic services). Of course, youll have to find out how portable these bindings are when switching to another BPEL engine.

90

CHAPTER SEVEN

You might also like