Chapter 1. Calling BPEL from Java

In this chapter we will cover:

  • Deploying a BPEL process
  • Gathering a BPEL process's in and out parameters
  • Calling a synchronous BPEL process from Java
  • Calling an asynchronous BPEL process from Java
  • Handling business faults from a synchronous BPEL process
  • Handling business faults from an asynchronous BPEL process
  • Mapping the results of a BPEL process

Introduction

Business processes are an integral part of every company. As new requirements arise in the business processes, companies pursue its alignment with IT as well. Pursuing the need for IT to efficiently support business processes in companies, the SOA (Service Oriented Architecture) was identified as the most important IT technology for business process implementation. Depending on the business environment, BPEL can also be considered as a suitable technology in EDA (Event Driven Architecture), since it provides constructs to handle events through event handlers (onMessage and onAlarm). Within SOA, the most common practice to implement business processes is by using a WSBPEL (Web Services Business Process Execution Language), or BPEL for short. Of course, SOA itself does not make it compulsory to use BPEL for business process implementation, and you can also use other workflow languages, such as BPMN, YAWL, and jBPM(JPDL) just to name some. BPEL is an XML-based language for the definition and execution of business processes, and has become the de-facto standard for orchestrating web service compositions. The first official version of BPEL specification was named BPEL4WS 1.1, or BPEL 1.1 for short, in 2003. Later on, a new version, WS-BPEL 2.0, with significant enhancements, was released in 2007.

A BPEL process definition has three main parts:

  • A BPEL file in XML form: This contains the definition of a process (main activities, variables, events, partner links, fault handlers, compensation handlers, and so on).
  • The WSDL files: These files present web service interfaces, utilized by the BPEL process for orchestration purposes. Similar to BPEL, WSDL also released several versions of specification, which are widely used today. In 2001, WSDL 1.1 (Web Service Definition Language) was released, followed by WSDL 2.0 (Web Service Description Language) in 2007.
  • The XSD schema files: These files present XML definitions of the BPEL request, response, and fault messages, as well as the BPEL variable definitions.

The three mentioned parts present the source code of the business process definition. The source code is deployed on a BPEL engine, which is responsible for managing, running, and monitoring the execution of business processes.

We can find many BPEL execution engines on the market. They are either open source or proprietary. We will name just a few of them here which are most commonly used by companies and communities:

Vendor

Product

License Type

BPEL specification supported

Oracle

Oracle SOA Suite

Proprietary

1.1 and 2.0

jBoss

jBPM

Open source

1.1 and partly 2.0

Apache

Apache ODE

Open source

1.1 and 2.0

Active Endpoint

ActiveVOS

Proprietary

1.1 and 2.0

IBM

WebSphere Process Server

Proprietary

1.1

All these BPEL engines have the support of a BPEL specification, either Version 1.1 or 2.0. However, vendors do extend the functionality of the BPEL specification with their own extensions, making migration of business processes between various BPEL platforms more difficult. For example, IBM WebSphere Process Servers provides the possibility to declare inline human tasks, while Oracle SOA Suite provides Java Embedding activity and extension functions to monitor process and perform various XPATH operations.

It is evident that BPM applications are emerging, as business environments are becoming ever more dynamic and the need for agile IT is increasing. BPEL, as an orchestration technology, is able to compose business processes from various services. We can monitor business processes in real time with BAM (business activity monitoring) solutions, and extend their flexibility with the use of BRMS (business rules management system).

To successfully integrate a BPEL process with other types of applications, we need to know the description of the provided BPEL process operations, the type of the BPEL process (synchronous or asynchronous), and how to handle various faults thrown from the BPEL process.

In this chapter, we will deal with the deployment of a BPEL process. We will then investigate how applications written in Java efficiently utilize the BPEL processes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset