jBpm FAQ's



You get a net.sf.hibernate.LazyInitializationException while using an object that you received from one of the jbpm services.


Before jbpm-2.0-beta2, this problem must tackled with an Assembler. An assembler is an object that specifies the graph of objects that you want to obtain from a jbpm service method.

As of jbpm-2.0-beta3, there is no need for an Assembler any more. See below

Where did the Assembler go ?


You get compiler errors because Assembler does not exist.


From jbpm-2.0-beta3, your Assembler object is not necessary any more. An assembler is an object that specifies the graph of objects that you want to obtain from a jbpm service method. This graph was completely fetched from the database before the session was closed at the end of the jbpm service method. The new approach keeps the session open between the open...Service methods and the service.close(). So jbpm can now give you lazy loaded objects that you can access (and load transparantly). As long as the lazy loading does not occur outside of the open-close block of the jbpm service.



java.sql.BatchUpdateException: ORA-01401: inserted value too large for column while trying to deploy a process on an oracle database.


Actually there's two problems that need to be solved :

  1. The first problem is that the default schema that is generated by hibernate will contain VARCHAR2(255) as text types. To solve this, generate the schema with the ant target generate.ddl in the core/build.xml and in the produced file, replace all occurences of VARCHAR2(255) with VARCHAR2(4000). Then execute that script on your database to create the jbpm tables.
  2. Second problem is that Oracle's jdbc drivers (i even think they're not jdbc-compliant) are not able to handle binary data properly. The simplest way to get around this is to configure jbpm to use the filesystem for storing binary data. In case you want to use an oracle database in a clustered environment, you'll have to find the right jdbc drivers (afaik, the oracle oci drivers are good and there are other vendors that provide good jdbc drivers for oracle db as well).

    To configure the filesystem for storing binary data, add the following properties to the jbpm.properties configuration file :


Group assignment


How to handle assignment of tasks to groups ?

Suppose you want to model following process behaviour : You have a group of employees. When execution of a process arrives in a state the task should be assigned to the group. Then all of the members of the group should be able to perform the work related to the task, but we must avoid that 2 members start doing the same task.


Group assignment is a form of process based assignment. For an introduction about process based assignments and for the explanation about how states relate to tasks, I would like to point to the jpdl section about assignments.

jBpm is not aware of differences between groups and individual members. As far as jBpm is concerned, they (people, groups and systems) are all actors with an actorId (java.lang.String).

The typical solution to this problem is to make a distinction between individual tasks and group tasks in the user interface. The user interface used to provide access to jBpm should know about the groups and members. For a given user, the user interface can then present the personal tasks in a separate list as the tasks assigned to all the groups of which the person is a member. The tasks in the personal lists can be performed by that user. That means that some form of navigation should be present that directs to a form. Submission of the form leads to a call to jBpm. No such navigation should be possible from the list of tasks assigned to a group. Instead, tasks assigned to one of the users' groups should have an action 'take'. Taking an action from a group means reassignment of the task from the group to the person that takes the task. After the reassignment, the task disappears from the group task list and appears in the personal task list. After reassignment, the user that took the task is the only one able to navigate to the form corresponding that task. Note that only the first person that takes a group task is able to do that.

junit error in ant build script


C:\Software\eclipse-2.1.2\workspace\jbpm2\build.xml:38: Following error occured while executing this line
C:\Software\eclipse-2.1.2\workspace\jbpm2\common.build.xml:92: Could not create task or type of type: junit.

Ant could not find the task or a class this task relies upon.

This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
 - You have misspelt 'junit'.
   Fix: check your spelling.
 - The task needs an external JAR file to execute
   and this is not found at the right place in the classpath.
   Fix: check the documentation for dependencies.
   Fix: declare the task.
 - The task is an Ant optional task and optional.jar is absent
   Fix: look for optional.jar in ANT_HOME/lib, download if needed
 - The task was not built into optional.jar as dependent
   libraries were not found at build time.
   Fix: look in the JAR to verify, then rebuild with the needed
   libraries, or download a release version from apache.org
 - The build file was written for a later version of Ant
   Fix: upgrade to at least the latest release version of Ant
 - The task is not an Ant core or optional task
   and needs to be declared using .

Remember that for JAR files to be visible to Ant tasks implemented
in ANT_HOME/lib, the files must be in the same directory or on the

Please neither file bug reports on this problem, nor email the
Ant mailing lists, until all of these causes have been explored,
as this is not an Ant bug.


Run 'ant install.ant.libs' in ${jbpm.home}. That target will copy the libs lib/junit/junit-3.8.1.jar and lib/clover/clover.jar into your ${ant.home}/lib directory.