Enterprise JBoss JBPM: Creating A Scalable, Standards-Compliant and Cost-Effective SOA Environment

This excerpt from the upcoming book, Open Source SOA, addresses the Service Component Architecture (SCA), and its sister technology, Service Data Objects (SDO), emerging standards used in service-oriented architecture for creating multi-protocol, multi-language services based on reusable components.

1 2 Page 2
Page 2 of 2

We have now completed our coverage of some of jBPM advanced features. Others, such as how to create your own node types and integration of jBPM console security, are not covered. The jBPM User Guide does provide some guidance on these matters, and the forum and source code can be indispensable as well. We will now look at a very exciting topic, and that is how to integrate jBPM with SCA and SDO, which was the topic of chapters 3 and 4, and a key cornerstone for creating a SOA environment.

Integration with SCA/SDO

The Service Component Architecture (SCA), and its sister technology, Service Data Objects (SDO), are an emerging standard for creating multi-protocol, multi-language services based on the concept of reusable components. Apache Tuscany is a reference implementation of SCA/SDO, and has recently achieved its 1.0 release. Chapters 3 and 4 of the Open Source SOA book covered Tuscany in some detail, and we will utilize some of these examples to demonstrate how we can integrate jBPM with SCA/SDO to make a powerful SOA combination.

One of the most frequent themes in the jBPM forums hosted by JBoss are questions about how to expose jBPM as web services. We have demonstrated in this and the prior chapter many examples of using jBPM API, and the capabilities and flexibility it offers. However, it is Java-specific, and clients wishing to access jBPM must embed jBPM libraries and calls within their code. This runs contrary to one of the main premises behind SOA: loose coupling. By embedding jBPM API calls within your clients, you have affectively limited flexibility, as you are tightly integrated with jBPM. A far better approach is to abstract out some of the complexities of the API into a web service faç,ade. This simplifies client development, promotes loose-coupling, and exposes jBPM as a cross-platform/protocol solution.

There are two main ways in which SCA can be integrated with jBPM. The most obvious way is to expose the jBPM API through web services. With SCA, you can create a service that can be exposed through any of its available bindings, such as SOAP, EJB, JMS etc.

For example, in the complete chapter 7 found in the book, we describe how a generic style services can be setup to enable clients to access jBPM through SOAP. The jBPM API services exposed include operations to list tasks by actor; list tasks by process instance; list process instances; and list processes. Adding additional service operations is shown to be a very straightforward process after these extensive examples.

The other SCA integration demonstrates how to use a node within jBPM as an SCA client to call external services.

Figure 6

In figure 6, the node called soap-sca-submit is an SCA client that is calling an external service from within jBPM. One often overlooked feature of SCA is how easily external SOAP service services can be invoked. The protocol details are completely transparent to the calling client (the book similar describes how this can be done). Through this brief discussion I think you can see the great marriage that can be achieved through jBPM and SCA. jBPM is a wonderful and powerful BPM solution, and when coupled with SCA/SDO, can open a world of possibilities for integration within a SOA environment.


This excerpt from chapter 7 of the forthcoming Open Source SOA book covers the two main areas of focus for that chapter — advanced features of jBPM and integrating jBPM with SCA/SDO through its Apache Tuscany implementation. The advanced features focus on some of the enterprise capabilities of jBPM, such as the ability to create superstates and subprocesses, both of which help bring greater order and management to defining complex business processes. The use of asynchronous continuations assist in circumstances where you are integrating with services that may not have predicable and/or timely responses. They also can help you create more distributed solutions.

The second section describes how you can integrate jBPM with SCA. This marriage addresses some of the recurring concerns with jBPM, namely, how do you call external services within the context of a reusable and consistent framework. We then reversed the requirement, and described how the jBPM API can be exposed through SCA so that it can be accessed through any number of different protocols, including SOAP and JMS. Through the combination of SCA/SDO and jBPM, we have the full spectrum of services addressed, from fine to coarse-grained, layered upon a compelling technology stack. Chapter 8 of the book, and the subject of our next excerpt, will describe how we can leverage the events derived from our services to provide complete operational insight and monitoring — an important value-added feature of a SOA environment.

This article is based on Open Source SOA by Jeff Davis, to be published in March 2009 (ISBN: 1933988541). It is being reproduced here by permission from Manning Publications. Manning early access books and ebooks are sold exclusively through Manning. Visit the book's page for more information.

Copyright © 2008 IDG Communications, Inc.

1 2 Page 2
Page 2 of 2
7 secrets of successful remote IT teams