The jPDL Runtime and Suite

The runtime

The jPDL runtime is all you need to get started with jPDL: jpdl libraries, third party libraries, examples and documentation. It doesn't include the graphcal designer and web console tooling, which is added in the suite package.

Table 5.4. jPDL runtime directories

DirectoryContent
configContains all the configuration files. Note that for easy testing and development, the current hibernate configuration points to the in-memory jbpm database.
dbContains the scripts to create the jPDL tables in your DB. It includes a copy of the wiki page about database compatibility.
docContains the userguide and the javadocs for the jpdl sources and identity sources
examplesEach example is a separate project that you can compile and run with ant or eclipse.
libAll the third party libs and their licenses.
srcThe sources for jpdl and the identity components.

The suite

The jPDL suite is an extension of the jPDL runtime with 2 tools: a graphical designer plugin for eclipse and a JBoss server that is preconfigured with a deployed version of the jPDL runtime and console webapp. The included tools are all preconfigured to work nicely together out of the box.

Table 5.5. jPDL suite extra directories

DirectoryContent
designerThe designer is the eclipse plugin that alows for graphical process editing of jPDL process files. Look in the designer/readme.html for more instructions on installing the designer.
serverThe server is actually a JBoss application server which has the jPDL runtime and the jPDL console web application deployed.

Configuring the logs in the suite server

If you want to see debug logs in the suite server, update file jpdl-suite-home/server/server/jbpm/config/log4j.xml Look for

   <!-- ============================== -->
   <!-- Append messages to the console -->
   <!-- ============================== -->

   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
      <param name="Target" value="System.out"/>
      <param name="Threshold" value="INFO"/>

And in param Threshold, change INFO to DEBUG.

Then you'll get debug logs of all the components. To limit the number of debug logs, look a bit further down that file until you see 'Limit categories'. You might want to add tresholds there for specific packages like e.g.

   <category name="org.hibernate">
      <priority value="INFO"/>
   </category>

   <category name="org.jboss">
      <priority value="INFO"/>
   </category>

Debugging a process in the suite

First of all, in case you're just starting to develop a new process, it is much easier to use plain JUnit tests and run the process in memory like explained in Chapter 3, Tutorial.

But if you want to run the process in the console and debug it there here are the 2 steps that you need to do:

1) in jpdl-suite-home/server/server/bin/run.bat, somewhere at the end, there is a line like this:

rem set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS%

For backup reasons, just start by making a copy of that line, then remove the first 'rem' and change suspend=y to suspend=n. Then you get something like

rem set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS%
set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n %JAVA_OPTS%

2) In your IDE debug by connecting to a remote Java application on localhost on port 8787. Then you can start adding break points and run through the processes with the console until the breakpoint is hit.