Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

Manage your business processes with JBoss jBPM

Get started using JBoss's business process management tool

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

Page 2 of 4

  • Process engine: This component executes defined process actions, maintains process state, and logs all process events via the following delegate components:
    • A request handler
    • A state manager
    • A log manager
    • A definition loader
    • An execution service
  • Process monitor: This module tracks, audits, and reports the state of processes as they execute
  • Process language: The process definition language (jPDL) is based on GOP
  • Interaction services: These services expose legacy applications as functions or data to be used in process executions

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 instance: A process instance is one execution of a process definition.
  • Token: A token is one path of execution. A token is the runtime concept that maintains a pointer to a node in the graph. When a process instance is created, a token is created for the main path of execution. This token is called the process instance's root token and is positioned in the process definition's start state.
  • Signal: A signal instructs a token to continue graph execution by transition out of a node.
  • Node: Nodes are responsible for the continuation of a graph execution. When a token enters a node, the node executes. A node that does not propagate execution is regarded as a state.
  • Action: Actions are instances of Java code executed when events occur in a process execution. The primary event types are "entering a node," "leaving a node," and "taking a transition."


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.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comments (5)
Login
Forgot your account info?

Jboss Rules TrainingBy Anonymous on September 7, 2009, 5:22 pmYou can try JBoss Rules Training http://www.nobleprog.co.uk/jboss+rules/training Hope it will help you

Reply | Read entire comment

JBOSSand JBPM integrationBy Anonymous on July 22, 2009, 5:55 amCan some one explain the steps to integrate JBPM with currently running jBOSS server? If any compatibility issues exists kindly throw some light on that as well?

Reply | Read entire comment

JBOSSand JBPM integrationBy Anonymous on July 22, 2009, 5:55 amCan some one explain the steps to integrate JBPM with currently running jBOSS server? If any compatibility issues exists kindly throw some light on that as well?

Reply | Read entire comment

jpdl modification at runtimeBy Anonymous on June 3, 2009, 12:32 pmhi, i am new in this field, someone knows if it is possible to modify the file process source at runtime in order to make the process more dynamic without having...

Reply | Read entire comment

how can test the workflow with a user and later with other?By Anonymous on October 9, 2008, 11:15 amif I created 2 users i supose that firts test with one user and later test the workflow with another?

Reply | Read entire comment

View all comments

Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources