Installation

Configure JBPM Console

Steps to install and configure the workflow engine in OpenKM v7.1:

  • Stop Tomcat
  • The workflow engine is available at the 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 your OpenKM instance. So, configure a user with enough permissions. This user should already exist 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". The username and password can be changed (and it's recommended). To change them, please go to http://localhost:8080/jbpm-console/admin/user and edit the corresponding user.

Keep in mind that you need to change the workflow.adapter.login and workflow.adapter.password configuration properties on the OpenKM side.

You can check $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 to match your system timezone, you can first see the mappings for both MySQL and MariaDB like this:

SELECT * FROM mysql.time_zone_name

So, for example, you could configure your JDBC connection like this if your system timezone is 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 the 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 attribute values named:

  • username
  • password
  • URL (change to your host 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

  • Create the configuration file $TOMCAT_HOME/jbpm-console.properties

Choose the dialect that best fits 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 attribute values named:

  • username
  • password
  • URL (change to your host 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 that best fits 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 attribute values named:

  • username
  • password
  • URL (change to your host and port)

Configuring SQL Server

  • Database creation

Start SQL Server Management Studio Express and create a database called jbpm_console.

Choose the appropriate database collation.

It is tested with Modern_Spanish_CI_AI_KS, where CI indicates case-insensitive collation and AS indicates accent-sensitive collation.

To ensure correct functionality, select 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 already been configured with another database, you can't switch to another database simply by changing this property.

Choose the Hibernate dialect that best fits your current SQL Server 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 attribute values named:

  • username
  • password
  • URL (change to your host and port)