Page 2 of 4
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.
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