Wandering of upgrading jBPM code base to version 4.3 Part 1: setting up the sandbox
When I found out that jboss is on its way to BPMN as was announced in http://processdevelopments.blogspot.com/2010/01/jbpm-43-includes-bpmn-20.html, my first reaction was: “I’ve been contemplating about upgrading from 3.2 to 4.0 for the past few months. Now there’s a BPMN-compliant 4.3 release. Have to take my chance now or lose it forever.”
The ultimate goal was to port our existing jBPM 3.2-based code base to jBPM 4.0 and convert all process definitions from JPDL to BPMN.
But I had to start with something less ambitious. For example, setting up the sandbox: jbpm 4.3 libraries and examples, eclipse jbpm 4.3 plugin, signavio, and of course jbpm console.
To start, I patiently turned to 2 manuals: developer’s guide and user’s guide
Source and binary downloads later followed by failed ant and maven builds followed by futile local tunings. I had realized that there should be some pattern to this madness. It meant to acknowledge to myself that I was a mere novice of jBPM, put the developer’s guide aside, and focus on the user’s guide as a single source of truth.
That was one of the wisest technical decisions I made.
I didn’t mind another Eclipse and another instance of jBoss since those that I had were configured and tuned for the existing jBPM 3.2 and jdk 1.5-based code base. I also decided that I will address the requirement of installing jBPM schema in DB2 database a little later.
Downloading binaries from http://sourceforge.net/projects/jbpm/files/ and confirming that I do have required supporting software, I happily proceeded to
cd ${jbpm.home}/install
ant demo.setup.jboss
to only watch ant miserably fail to download jboss installation archive.
The cause and solution were obvious: I had to tune ant to drill through a firewall mounted between me and the free internet world. Following ant instructions and getting the values from my firefox’s proxy settings
set ANT_OPTS -Dhttp.proxyHost=[host] -Dhttp.proxyPort=[port] ant demo.setup.jboss
began to look promising. But not for long…
Once again, ant had miserably failed. This time the successfully installed jboss, failed to start due to the jnp socket error – port 1098 is in use. Running netstat -ao didn’t reveal any ports remotely resembling the culprit 1098. Killing all java processes running on my box didn’t make any difference. I decided to do it hard way and change the port
from %jboss-home%, executed
findstr /s /m /c:"1098" *.xml
it brought me a few files back including
%jboss-home%\server\default\conf\bootstrap.bindings.xml
Since that was the only file under “default” server, changing the port there from 1098 to 1298 made a trick. There was no need to run the entire setup again, so once again,
ant install.jbpm.into.jboss
began to look promising. And once again, not for long… This time, the jboss failed with
java.sql.SQLException: socket creation error
The old trail of tweaking jboss config looked stale. Feeling like my brain wheels are squeaking with effort, I turned to the HyperSQL DB documentation. Luckily, it stroke me relatively quickly that on the contrary from the ancient jboss 4.2 that I’ve been using for the project, jboss 5.0, or at least that distribution that was brought and installed by ant, doesn’t seem to start HSQL server as part of its startup. Found and started
hsqldb-server\start-hsqldb-manager.bat ant create.jbpm.schema
Finally, ant behaved as advertised.
Choosing not to use packaged ant tasks to stop/start jboss,
cd %jboss_home%\bin run.cmd
And voila! jBoss was up and running. I was able to access the jBPM console and Signavio web editor.
After diligently following instructions on setting up the graphical designer for eclipse, the sandbox was complete.
The time was to figure out
- Change jBoss config to start HSQL along with jBoss startup
- Use of Signavio, just for fun
- Migrate old-style JPDL to new-stlye JPDL to BPMN
- Deploy process definitions
- Use admin console
- Move the schema to DB2
- Extract java-implemented rools into drools and plugging them into process definitions
To be continued…
