Developing Business Processes with BPEL
BPEL uses an XML-based vocabulary that allows us to specify and describe business processes. As mentioned in Chapter 1, with BPEL, you can describe business processes in two distinct ways:
- Executable business processes specify the exact details of business processes and can be executed by a BPEL engine. In the majority of cases we will use BPEL to specify executable processes.
- Abstract business processes specify only the public message exchange between parties, without including the specific details of process flows. They are not executable and are rarely used.
This chapter focuses on executable business processes. Abstract business processes are covered in the next chapter.
Executable business processes are processes that compose a set of existing services. When we describe a business process in BPEL, we actually define a new web service that is a composition of existing services. The interface of the new BPEL composite web service uses a set of port types, through which it provides operations like any other web service. To invoke a business process described in BPEL, we must invoke the resulting composite web service.
In a typical scenario, the BPEL business process receives a request. To fulfill it, the process then invokes the involved web services and finally responds to the original caller. Because the BPEL process communicates with other web services, it relies heavily on the WSDL description of the web services invoked by the composite web service.
Anyone developing BPEL processes requires a good understanding of WSDL and other related technologies. BPEL introduces WSDL extensions, which enable us to accurately specify relations between several web services in the business process. These relations are called partner links. The following figure shows a BPEL process and its relation to web services (partner links):
Any BPEL process specifies the exact order in which participating web services should be invoked. This can be done sequentially or in parallel. With BPEL, we can express conditional behavior, for example, a web service invocation can depend on the value of a previous invocation. We can also construct loops, declare variables, copy and assign values, define fault handlers, and so on. By combining all these constructs, we can define complex business processes in an algorithmic manner. We can describe deterministic as well as non-deterministic flows. Because business processes are essentially graphs of activities, it is sometimes useful to express them using UML (Unified Modeling Language) activity diagrams. To understand how business processes are defined in BPEL, we look at the core concepts in the next section.