jBPM Developer Guide

March 1st, 2010 by John Turner No comments »

Business Process Management (BPM) has been around in one guise or another for quite a while now and most people have had some exposure to its many facets.  With so much promised, it is easy to see why it has generated so much interest.

jBPM is an open source BPM framework from JBoss that has matured into a real alternative to the many other BPM offerings.  The ‘jBPM Developer Guide’ introduces to its readers the main artifacts of BPM and what is involved in implementing typical jBPM solution.

The book begins by providing a background to BPM and how it can be leveraged to deliver benefit to the business.  This includes an introduction to processes, tasks and process management (Business Process Management or BAM).  As any good book should, terminologies that are associated with BPM are introduced and defined.  Thankfully, the definitions are void of the usual marketing hype.

With the help of an example, graph orientated programming (GOP) is then introduced and its relevance to jBPM discussed.  Specifically the Node, Transition and Process Definition concepts are covered before the author works through sample implementations of each.  Wait states (asynchronous system interactions and human tasks) and automatic nodes are compared before process execution is demonstrated through a sample process execution engine implementation.

The book goes on to give some background to the jBPM project and covers the setup of tools to be used throughout the remainder of the book (Maven, MySql, Eclipse etc.). It outlines how to install jBPM from a distribution and from source. I used the installer to install the version used for the examples (3.2.6.SP1).

Two example process projects are then created using the eclipse designer plugin and then the maven plugin to contrast both approaches.  Use of the ‘Graphical Process Editor’ is also demonstrated.

The jPDL language is then explored in greater depth describing in detail the XML\Class definitions of the process, the various node types (Node, Start State, End State, State, Decision), transitions and the execution token.  As an example (recruitment) process is automated with the jBPM framework.  This is achieved iteratively adding more detail in each stage.

Process instance persistence is discussed in depth.  This includes details on how and when process definition amd process instance persistence occurs.  A brief review is given of the jBPM API to interact with the database and the jBPM\Hibernate persistence configuration.

Human Task’s are explained including details on input data, task action and output data.  The distinction between a TaskNode and Task is also made.  A brief introduction to the jBPM Identity module is provided during a discussion about task assignment before demonstrating an example process.

The transactional behaviour of jBPM is then discussed along with a more detailed discussion on variable mappings and task assignment.  Process variables and the type’s of information stored in process variables are explained and the specific API for variable manipulation is covered in brief, along with the variable persistence and hierarchy. These concepts are demonstrated with a concrete example.

More advanced node types are covered in this chapter including Fork and Join nodes, Super state nodes, Process state nodes and the Email node. Variable mapping strategies as discussed in depth and related to the Process State node.

Further examples of using Super state nodes and Process state nodes are covered in addition to asynchronous execution and the JobExecutor.  The examples focused on the asynchronous execution are thorough and provide a good understanding of this process.

The book finished by discussing the use of jBPM within a JEE environment.  In particular, JTA, Data Source’s, the CommandServiceBean, the JobExecutor and JMS and finally Timers and reminders.

My overall impression of the book was that it relayed the key information required to get up and running with jBPM.  The author was clearly knowledgeable in the subject and provided useful examples to complement the concept’s being discussed.  I liked the fact that the author gives details on installing the developer tools as it allows the reader to follow along with the examples.

The only negative comment I can make was that I found the poor construction of sentences and awkward use of English a little distracting.  It reads as a book that was translated into English from another language.

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...
  • Print
  • Digg
  • del.icio.us
  • DZone
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter
  • Facebook
  • Technorati
  • email
  • Google Bookmarks
  • LinkedIn
  • Yahoo! Bookmarks

Creating a Logging Aspect with Spring AOP and AspectJ

February 16th, 2010 by John Turner No comments »

After working in software development for a number of years, one tends to build up a repository of useful code examples and utilities.  I’m certainly no different in this regard and go one step further by maintaining a hosted Subversion repository to keep such code examples safe and sound (and readily accessible).

One such code example that I often turn to is a logging aspect implemented using Spring AOP and AspectJ.  This logging aspect traces method entry and exit which proves very useful if you need to perform root cause analysis in pre-production environments.

In what follows, I’m going to share this code example.  I have also made the logging aspect source code available for download.

I have assumed you have a reasonable grasp of Aspect Orientated Programming concepts and terminologies.
» Read more: Creating a Logging Aspect with Spring AOP and AspectJ

  • Print
  • Digg
  • del.icio.us
  • DZone
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter
  • Facebook
  • Technorati
  • email
  • Google Bookmarks
  • LinkedIn
  • Yahoo! Bookmarks

Web Form Validation with JBoss RichFaces and Hibernate Validator

February 9th, 2010 by John Turner No comments »

Last month I posted about Building a Dynamic Tree with JBoss RichFaces and Spring Web Flow. Since then, I have received a few requests to demonstrate how to implement validation within the modal dialog. There are several internet resources that already deal with this but none that provide a complete working example so I decided I would do just that.

You can download the source code in the form of a Maven project and follow along.

Hibernate Validator Dependencies

First step is to add the Hibernate Validator dependency to the project pom. I have used Hibernate Validator 4.0.0.GA because it is a JSR 303 compliant implementation.

<dependency>
  <groupid>org.hibernate</groupid>
  <artifactid>hibernate-validator</artifactid>
  <version>4.0.0.GA</version>
  <scope>compile</scope>
</dependency>

Listing 1 : Hibernate Validator Dependency

» Read more: Web Form Validation with JBoss RichFaces and Hibernate Validator

  • Print
  • Digg
  • del.icio.us
  • DZone
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter
  • Facebook
  • Technorati
  • email
  • Google Bookmarks
  • LinkedIn
  • Yahoo! Bookmarks

Marshalling XML with Spring WS and JAXB

February 4th, 2010 by John Turner No comments »

The ‘object-relational impedance mismatch’ is a well documented set of conceptual and technical difficulties that are often encountered when a relational database management system is being used by a program written in an object-oriented programming language. A similar impedance mismatch exists when XML is used by a program written in an object-oriented programming language.

Many popular ‘Object-Relational Mapping’ (ORM) frameworks exist that address the object-relational impedance mismatch and no doubt helped to inspire the evolution of ‘Object-XML Mapping’ (OXM) frameworks to address the object-xml impedance mismatch.

For the Java community, there are a number of OXM frameworks from which to choose (Castor, XStream, JiBX, JAXB) with each having particular strengths and weaknesses. The standard OXM framework for Java is JAXB.

In the following I work through a simple example that demonstrates object to XML marshalling (and demarshalling) using Spring, Spring WS and JAXB (and later JAXB Introductions!)

I have provided Maven projects for download so you can follow along:

Spring OXM and JAXB Source Download
Spring OXM, JAXB and JAXB Introductions Download
» Read more: Marshalling XML with Spring WS and JAXB

  • Print
  • Digg
  • del.icio.us
  • DZone
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter
  • Facebook
  • Technorati
  • email
  • Google Bookmarks
  • LinkedIn
  • Yahoo! Bookmarks

Ron Jefferies – Annals of Kate Oneal

January 27th, 2010 by John Turner No comments »

While I was re-reading JUnit Recipes recently I followed one of the suggested links to Ron Jefferies website on Extreme Programming.  Ron provides some really interesting material on his website but one of the things that I really liked was the ‘Annals of Kate Oneal‘.

Anyone who has read one of the Head First series of books will be familiar with a conversational style of writing that introduces concepts progressively through fictitious scenarios.  Ron uses a similar approach with the ‘Annals of Kate Oneal’ through which he presents Agile ideas and concepts.

The ‘Annals of Kate Oneal’ are presented in a series of bite size stories centered on Kate Oneal, who is advocating Agile methods to a company that has had difficulty using traditional approaches to software development.  As an advocate, Kate is often explaining the advantages of Agile from different perspectives and to different audiences.  She also has to deal with the practical aspects of introducing Agile to a company that has no previous exposure, so is often found in the role of a mentor.

I am not going to describe her tales any further but, if you haven’t done so already, I do recommend you visit Ron Jefferies website and read the ‘Annals of Kate Oneal’.

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...
  • Print
  • Digg
  • del.icio.us
  • DZone
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter
  • Facebook
  • Technorati
  • email
  • Google Bookmarks
  • LinkedIn
  • Yahoo! Bookmarks