Some reader favorites:
EJB fundamentals and session beans
Create a scrollable virtual desktop in Swing
Wizard API updated!
Tim Boudreau has released a new version of the Swing Wizard library (version 0.997) that fixes the WizardException bug reported in JavaWorld's recent Open Source Java Project profile. The article's examples have been reworked to test out the new, improved WizardException. Thanks, Tim, for this helpful fix!
Open Source Java Projects: The Wizard API
Enterprises have searched diligently for a structured approach for designing business actions/transactions and executing them preferably using automated processes. Business process management (BPM) and workflow management offer a solution to this problem using concepts such as actions, tasks, and flows.
This article introduces BPM and discusses techniques and tools to empower enterprise systems with BPM and workflow management using JBoss jBPM.
The term business process management typically refers to a set of activities enterprises can employ to automate and optimize business processes in a manner adaptable to dynamically changing environments. These activities usually seek help from software engineering and tools; therefore, the term BPM is often used directly to refer to the engineering techniques and tools.
BPM is embodied in three distinct practices:
BPM seeks to allow software engineers to share the same concepts and frameworks as business analysts; consequentially, software vendors have attempted to create tools that will allow enterprises to capture, design, and optimize business processes through the employment of graphical modeling tools, domain-specific languages, and proprietary applications.
JBoss jBPM 3.0 delivers the capability of developing new automated business processes and workflows with industry-standard orchestration using Business Process Execution Language (BPEL), a flexible and pluggable API, a native process definition language, and a graphical modeling tool.
JBoss jBPM is an open source (LGPL license) framework of Java APIs, tools, and a definition language that can operate as a Web application or a standalone Java application. JBoss jBPM acts as an intermediary between business analysts and developers by giving them a common process definition language referred to as jPDL.
JBoss jBPM defines process definitions within files written using the JBoss process definition language. jPDL is a graphic-oriented programming (GOP) language based on a model of nodes, transitions, and actions. In this model, nodes are commands executed as they are encountered during the flow of a process definition. Transitions direct the flow of execution of a process definition, and actions perform specific logic as a node or transition event occurs.
In jBPM, process definitions are packaged as process archives. A process archive is passed to the jPDL process engine for execution. The jPDL process engine traverses a process graph, executes defined actions, maintains process state, and logs all process events.
JBoss jBPM is encapsulated within the following components:
The relationships between these components are illustrated in Figure 1.
Figure 1. Component relationships of JBoss jBPM. Click on thumbnail to view full-sized image.
As shown in Figure 1, jBPM process definitions containing action handlers are loaded and executed by the jBPM process engine. When the process engine encounters a node in the process definition that has an action associated with it, all related action handlers are invoked. Action handlers are instances of Java code that interact with external systems when executed.
The following is an example of a simple action handler:
import org.jbpm.graph.def.*;
import org.jbpm.graph.exe.*;
public class MyActionHandler
implements ActionHandler
{
public void execute(ExecutionContext executionContext)
{
System.out.println("MyActionHandler has executed: " + executionContext);
}
}
The PDL file in a process archive is named process-definition.xml. This file contains the formal description of the processes. An example of a process-definition.xml file is illustrated in the following example:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE process-definition PUBLIC "-//jbpm/jBPM Mapping DTD 2.0//EN" "http://jBPM.org/dtd/processdefinition-2.0.dtd">
<process-definition name="purchase process">
<!--...-->
<!-- START-STATE -->
<start-state name="request a purchase">
<transition to="evaluating"/>
</start-state>
<!-- NODES -->
<state name="evaluating">
<!--...-->
<transition name="approve" to="purchase approved"/>
<transition name="disapprove" to="done"/>
</state>
<fork name="purchase approved">
<transition to="decrement inventory" />
<transition to="increment revenue" />
</fork>
<state name="decrement inventory">
<!--...-->
<transition to="join" />
</state>
<state name="increment revenue">
<!--...-->
<transition to="join" />
</state>
<join name="join">
<transition to="done" />
</join>
<!-- END-STATE -->
<end-state name="done" />
</process-definition>
A process definition is based on a directed graph. The graph is composed of nodes, transitions, one start state, and one end state. The type of each node defines the runtime behavior for the node. While a process definition executes, the following entities come into play:
Process definitions can be created easily with the jBPM graphical modeling designer. The designer is currently installed as an Eclipse plug-in. Figure 2 illustrates a sample screen from the graphical modeling designer.
Figure 2. The jBPM graphical modeling designer. Click on thumbnail to view full-sized image.
The graphical designer can be used to create process definitions, attach action handlers to events, edit definition source, create process archives, test process definitions, and so on.
JBoss jBPM stores process definitions in a database. Therefore, deploying a process into JBoss jBPM involves parsing the process-definition.xml and storing it in the JBoss jBPM database. This can be done by:
par Ant task supplied with JBoss jBPM to create a process archive.
JBoss jBPM acts as an orchestration engine that sits in the middle of enterprise applications, enabling integration and coordination between different applications.
For this article, I use the sample deployment shipped with jBPM to discuss how jBPM and jPDL are used to create and modify a simple Web-enabled order processing system.
The JBoss jBPM starter kit contains everything needed to execute JBoss jBPM, with the exception of a JDK. The JBoss Application Server in the JBoss jBPM starter kit requires J2SE 1.4 or a more recent version.
After you have downloaded the starter kit, unzip it to a directory of your choosing. Once you have unzipped the starter kit, you will have a directory structure similar to the following:
To start the JBoss application server with jBPM deployed, go to the jbpm-server directory and execute the startup script found there. A command window should pop up with the jBPM console window, similar to Figure 3.
| Subject | Replies |
Last post
|
|
By JavaWorld
|
0 |
04/22/08 06:03 AM
by Anonymous |
|
By |
0 |
04/22/08 06:03 AM
by Anonymous |
|
By Paul Browne |
2 |
04/22/08 06:03 AM
by Anonymous |
|
By Kukeltje |
0 |
04/22/08 06:03 AM
by Anonymous |
|
By darpin81 |
2 |
02/13/08 02:32 PM
by Anonymous |
Free Download - 5 Minute Product Review. When slow equals Off: Manage the complexity of Web applications - Symphoniq
![]()
Free Download - 5 Minute Product Review. Realize the benefits of real user monitoring in less than an hour. - Symphoniq