Install jBPM 4.3 into existed JBoss 5.1
19 styczeń 2010 17:52
jBPM package provided ant-based installed with bunch of targets. Main
target demo.setup.jboss supposed to do everything
for you:
- Download and install jBoss server (5.0 by default);
- Download and install eclipse;
- Install jBPM service and demo applications into jBoss;
- Install GPD into Eclipse;
But, in my case I do not need it - I've already have JBoss 5.1
installed and want to use it. As well, as I've already have Eclipse,
no needs to install another one.
So, here is small set of instructions how to run new jBPM 4.3 into
existed JBoss 5.1 installation.
In examples bellow I suppose JBoss installed in some
<path-to-jboss> and jbpm unzipped into some <path-to-jbpm>
Change configuration files
To perform installation you need to change a little bit <path-to-jbpm>/install/build.xml:
<property name="jboss.version" value="5.1.0.GA" />
<property name="jboss.parent.dir" value="${jbpm.home}" />
<property name="jboss.home" value="<path-to-jboss>" />
So, we will tell jBPM istall scripts to use your JBoss server
Change DB configuration
By default, jBPM configured to use HSQL, what is OK in case we are
using JBoss server. But, jBPM supposed own HSQL server to be run. Do
you really need it? In my case I've prefer to use same way as used in
server for DefaultDS. So, we need to edit <path-to-jbpm>/install/jdbc/hsqldb.properties:
jdbc.driver=org.hsqldb.jdbcDriver
jdbc.url=jdbc:hsqldb:<path-to-jboss>/server/default/data/hypersonic/jbpmDB
jdbc.username=sa
jdbc.password=
As result jbpmDB will be created in same folder as default localDB
Of course, if you want to use some other DB - like MySQL or
PostgreSQL you will need to make your changes accordenly
Create DB Schema
Simple run in your <path-to-jbpm>/install
# ant create.jbpm.schema
Install jBPM
Now to install jBPM do:
# ant install.jbpm.into.jboss
Install Example Data
If you like - you can add example data (users and processes) into DB
(JBoss server should be stopped during this actions):
# ant load.example.identities
In my cases it is reported 14 SQL statements were executed, but
it is not created required users (I do not know why), so, I had to do
it by hand:
Run HSQL Database Manager:
# ant hsqldb.databasemanager
Connect it to my DB at jdbc:hsqldb:
<path-to-jboss>/server/default/data/hypersonic/jbpmDB
Run SQL statements from <path-to-jbpm>/install/src/demo/example.identities.sql
Run Server, Validate everything working
Now, you can run your server: jbpm-console will be available at
http://localhost:8080/jbpm-console and you can login as one of the
users: alex, mike, peter, mary and password 'password'
As result you have:
- JbpmDS datasource configured, pointed to HSQL DB;
- JbpmService configured;
- jbpm-console & jbpmeditor web-applications deployed
As well as some other staff required for proper jBPM working