Installation
Configure JBPM Console
Steps to install and configure the workflow engine in OpenKM v7.1:
- Stop Tomcat
- The workflow engine is available at OpenKM download center (jBPM Console)
- Place the jbpm-console.war file into $TOMCAT_HOME/webapps
- Create the database:
CREATE DATABASE jbpm_console DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
CREATE USER 'jbpm_console'@'%' IDENTIFIED BY 'choose-any-pass';
GRANT ALL ON jbpm_console.* TO 'jbpm_console'@'%' WITH GRANT OPTION;
- Create the configuration file $TOMCAT_HOME/jbpm-console.properties
# Database
hibernate.connection.driver=com.mysql.cj.jdbc.Driver
hibernate.connection.url=jdbc:mysql://localhost:3306/jbpm_console?autoReconnect=true&useUnicode=true&characterEncoding=UTF8&serverTimezone=CET
hibernate.connection.username=jbpm_console
hibernate.connection.password=choose-any-pass
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.hbm2ddl=create
# REST
openkm.rest.url=http://localhost:8080/openkm
openkm.rest.user=okmAdmin
openkm.rest.password=the-password
- The openkm.rest configuration property family is also important because jBPM Console will use this user to interact with you OpenKM instance. So, configure an user with enought permissions. This user should already exists in OpenKM.
- Start Tomcat
- Log into OpenKM and go to Administration > Config
- Set the workflow.adapter configuration property to com.openkm.workflow.adapter.JbpmRemoteWorkflowAdapter
- By default the jBPM Console application will be available at http://localhost:8080/jbpm-console/. The Admin section is restricted. You can change the workflow url with the configuration parameter named workflow.adapter.url.
- By default the user and password are set to "admin" and "admin". This user and password can be changed (and it's recommended). To change it, please go to http://localhost:8080/jbpm-console/admin/user and edit the corresponding user.
Keep on mind that you need to change the workflow.adapter.login and workflow.adapter.password configuration properties on the OpenKM side.
- To deploy a workflow, go to http://localhost:8080/jbpm-console/admin/workflow
- In this page, you can also access to previously deployed workflows, process instances and so on.
You can check the $TOMCAT_HOME/logs/jbpm-console.log in case of problems
Configure database
Configuring MySQL and MariaDB
MySQL:
- Create the database:
CREATE DATABASE jbpm_console DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
CREATE USER jbpm_console@localhost IDENTIFIED BY 'choose-any-pass';
GRANT ALL ON jbpm_console.* TO jbpm_console@localhost WITH GRANT OPTION;
- Create the configuration file $TOMCAT_HOME/jbpm-console.properties
In the latest MySQL versions, it seems you need to add useSSL=false to the connection URL.
# Database
hibernate.connection.driver=com.mysql.cj.jdbc.Driver
hibernate.connection.url=jdbc:mysql://localhost:3306/jbpm_console?autoReconnect=true&useUnicode=true&characterEncoding=UTF8&serverTimezone=CET
hibernate.connection.username=jbpm_console
hibernate.connection.password=choose-any-pass
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.hbm2ddl=create
# REST
openkm.rest.url=http://localhost:8080/openkm
openkm.rest.user=okmAdmin
openkm.rest.password=the-password
- Timezone ( optional )
If you want to set your timezone in your JDBC connection according to your timezone configured in your system, first you can see the mappings for both MySQL and for MariaDB in this way:
SELECT * FROM mysql.time_zone_name
So, for example, you could configure your JDBC connection like this if your system timezone is for example UTC+1:
hibernate.connection.url=jdbc:mysql://localhost:3306/jbpm-console?autoReconnect=true&useUnicode=true&characterEncoding=UTF8&serverTimezone=Europe/Madrid
Where Europe/Madrid is a valid value taken from table time_zone_name.
MariaDB:
- Create the database:
CREATE DATABASE jbpm_console DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
CREATE USER jbpm_console@localhost IDENTIFIED BY 'choose-any-pass';
GRANT ALL ON jbpm_console.* TO jbpm_console@localhost WITH GRANT OPTION;
- Create the configuration file $TOMCAT_HOME/jbpm-console.properties
MariaDB can use these driverClassName values:
- com.mysql.jdbc.Driver
- org.mariadb.jdbc.Driver
# Database
hibernate.connection.driver=org.mariadb.jdbc.Driver
hibernate.connection.url=jdbc:mariadb://localhost:3306/jbpm_console?autoReconnect=true&useUnicode=true&characterEncoding=UTF8
hibernate.connection.username=jbpm_console
hibernate.connection.password=choose-any-pass
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.hbm2ddl=create
# REST
openkm.rest.url=http://localhost:8080/openkm
openkm.rest.user=okmAdmin
openkm.rest.password=the-password
Configure the attributes values named:
- username
- password
- url ( change to your hosts and port )
Configure PostgreSQL
- Create a database
DROP DATABASE IF EXISTS jbpm_console;
CREATE USER jbpm_console WITH PASSWORD 'choose-any-pass';
CREATE DATABASE jbpm_console WITH OWNER jbpm_console ENCODING 'UTF8';
Or from the command line
$ createuser --pwprompt jbpm_console
$ createdb --owner=jbpm_console --encoding=UTF8 jbpm_console
More info at:
- Create the configuration file $TOMCAT_HOME/jbpm-console.properties
Choose the dialect what fits better with your database version:
- PostgreSQLDialect
# Database
hibernate.connection.driver=org.postgresql.Driver
hibernate.connection.url=jdbc:postgresql://localhost:5432/jbpm_console
hibernate.connection.username=jbpm_console
hibernate.connection.password=choose-any-pass
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
hibernate.hbm2ddl=create
Configure the attributes values named:
- username
- password
- url ( change to your hosts and port )
Configuring Oracle
- Database creation
- Create tablespace
create tablespace JBPM_CONSOLE_DATA datafile '/u01/app/oracle/oradata/XE/jbpm_console_data.dbf' size 100M;
- Create a database and user
create user JBPM_CONSOLE identified by choose-any-pass default tablespace JBPM_CONSOLE_DATA quota unlimited on JBPM_CONSOLE_DATA;
grant all privileges to JBPM_CONSOLE;
grant create any context, create cluster, create dimension, create indextype, create job, create materialized view, create operator,
create procedure, create sequence, create session, create synonym, create table, create trigger, create type, create view to JBPM_CONSOLE;
- Create the configuration file $TOMCAT_HOME/jbpm-console.properties
Choose the dialect what fits better with your database version:
- Oracle8iDialect
- Oracle9iDialect
- Oracle10gDialect
# Database
hibernate.connection.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
hibernate.connection.url=sqlserver://localhost:1433;databaseName=okmdb
hibernate.connection.username=JBPM_CONSOLE
hibernate.connection.password=choose-any-pass
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
hibernate.hbm2ddl=create
Configure the attributes values named:
- username
- password
- url ( change to your hosts and port )
Configuring SQL Server
- Database creation
Start SQL Server Management Studio Express and create a database called jbpm_console.
Choose the appropriate database collate.
It is tested with Modern_Spanish_CI_AI_KS, where CI indicate case-insensitive collation and AS indicate accent-sensitive collation.
To ensure the correct functionality it should be selected case-insensitive
Make sure the database compatibility level matches the Hibernate database dialect configured at jbpm-console.properties. More info at Nivel de compatibilidad de ALTER DATABASE (Transact-SQL).
- Create the configuration file $TOMCAT_HOME/jbpm-console.properties
This configuration property should be set before the database creation. Once the database has been initialized don't modify it because you can damage the installation.
If your application installation has been already configured with another database you can't switch to another database simply changing this property.
Choose the hibernate dialect what fits better with your current SQLServer database version:
- SQLServer2005Dialect
- SQLServer2008Dialect
- SQLServerDialect
# Database
hibernate.connection.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
hibernate.connection.url=jdbc:sqlserver://localhost:1433;databaseName=jbpm_console
hibernate.connection.username=jbpm_console
hibernate.connection.password=choose-any-pass
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
hibernate.hbm2ddl=create
Configure the attributes values named:
- username
- password
- URL ( change to your hosts and port )