Installation

Configure OKMFlow

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

Keep on mind that OKMFlow needs Java 17 and Tomcat 10.1 so you can't simple deploy the okmflow.war in you current OpenKM installation.

When you download OKMFlow the ZIP already contains the Tomcat 10.1 + OKMFlow bundle.

  • The workflow engine is available at OpenKM download center (OKMFlow)
  • Unzip the Tomcat + OKMFLow bundle.
  • Create the database:
CREATE DATABASE okmflow DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
CREATE USER 'okmflow'@'%' IDENTIFIED BY 'choose-any-pass';
GRANT ALL ON okmflow.* TO 'okmflow'@'%' WITH GRANT OPTION;
  • Create the configuration file $TOMCAT_OKMFLOW_HOME/okmflow.properties
# Database
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.datasource.url=jdbc:mariadb://localhost:3306/okmflow?autoReconnect=true&useUnicode=true&characterEncoding=UTF8
spring.datasource.username=okmflow
spring.datasource.password=choose-any-pass # JPA Stuff
spring.jpa.hibernate.ddl-auto=create-only
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MariaDBDialect
  • Start OKMFlow Tomcat

OpenKM Configuration steps:

  • Log into OpenKM and go to Administration > Config
  • Set the workflow.adapter configuration property to com.openkm.workflow.adapter.OKMWorkflowAdapter
  • Set the workflow.adapter.url to the OKMFlow URL (for example, http://localhost:8180/okmflow)
  • Set the workflow.adapter.login to the OKMFlow admin user (by default is "admin")
  • Set the workflow.adapter.password to the OKMFlow "admin" password (by default is "admin")

OKMFLow usage:

  • By default the OKMFlow application will be available at http://localhost:8180/okmflow. The Admin section is restricted. 
  • By default the user and password are set to "admin" and "admin". To change it, please go to http://localhost:8180/okmflow and edit the corresponding user.
  • Remember to chage the workflow.adapter.password OpenKM configuration property to match the new password.

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:8180/okmflow 
  • In this page, you can also access to previously deployed workflows, process instances and so on.

You can check the $TOMCAT_HOME/logs/okmflow.log in case of problems

Configure database

Configuring MariaDB

  • Create the database:
CREATE DATABASE okmflow DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
CREATE USER okmflow@localhost IDENTIFIED BY 'choose-any-pass';
GRANT ALL ON okmflow.* TO okmflow@localhost WITH GRANT OPTION;
  • Create the configuration file $TOMCAT_HOME/okmflow.properties

# Database
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.datasource.url=jdbc:mariadb://localhost:3306/okmflow?autoReconnect=true&useUnicode=true&characterEncoding=UTF8
spring.datasource.username=okmflow
spring.datasource.password=choose-any-pass

# JPA Stuff
spring.jpa.hibernate.ddl-auto=create-only
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MariaDBDialect

Configure the attributes values named:

  • username
  • password
  • url ( change to your hosts and port )

Configuring PostgreSQL

  • Create a database
DROP DATABASE IF EXISTS okmflow;
CREATE USER okmflow WITH PASSWORD 'choose-any-pass';
CREATE DATABASE okmflow WITH OWNER okmflow ENCODING 'UTF8';

Or from the command line 

$ createuser --pwprompt okmflow
$ createdb --owner=okmflow --encoding=UTF8 okmflow

  • Create the configuration file $TOMCAT_HOME/okmflow.properties
# Database
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://localhost:5432/okmflow
spring.datasource.username=okmflow
spring.datasource.password=choose-any-pass

# JPA Stuff
spring.jpa.hibernate.ddl-auto=create-only
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect

Configure the attributes values named:

  • username
  • password
  • url ( change to your hosts and port )

Configuring Oracle

  • Database creation
  • Create tablespace
create tablespace OKMFLOW_DATA datafile '/u01/app/oracle/oradata/XE/okmflow_data.dbf' size 100M;
  • Create a database and user
create user OKMFLOW identified by choose-any-pass default tablespace OKMFLOW_DATA quota unlimited on OKMFLOW_DATA;
grant all privileges to OKMFLOW;
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 OKMFLOW;
  • Create the configuration file $TOMCAT_HOME/okmflow.properties

# Database
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@localhost:1521:OKMFLOW
spring.datasource.username=OKMFLOW
spring.datasource.password=choose-any-pass

# JPA Stuff
spring.jpa.hibernate.ddl-auto=create-only
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.OracleDialect

Configure the attributes values named:

  • username
  • password
  • url ( change to your hosts and port )