Installation

Steps to install and configure the electronic document exchange application in OpenKM v7.1:

In case you want to install EDX in a different server than OpenKM, you need to create the database:

CREATE USER 'edx'@'%' IDENTIFIED BY 'openkm';
CREATE DATABASE edx DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
GRANT ALL ON edx.* TO 'edx'@'%' WITH GRANT OPTION;

Otherwise, you have to use the same database used for OpenKM. 

  • Stop Tomcat
  • Download the application from OpenKM download center
  • Place the edx.war file into $TOMCAT_HOME/webapps
  • Place the edx-plugins.jar file into $TOMCAT_HOME/plugins
  • This application needs to share the database with OpenKM, so you don't need to create a new one
  • Create the configuration file $TOMCAT_HOME/edx.properties (this is a sample configuration that needs to be adapted to the target environment)
# Database
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/okmdb?useUnicode=true&characterEncoding=UTF8&serverTimezone=CET
spring.datasource.username=openkm
spring.datasource.password=openkm

# JPA stuff spring.jpa.hibernate.ddl-auto=create spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL57InnoDBDialect # OpenKM openkm.url=http://localhost:8080/openkm openkm.url.preview=http://localhost:8080/openkm # OpenKM admin user admin.user=okmAdmin admin.password=admin # OpenKM edx user edx.user=edxUsr edx.password=s3cr3t0 # Available languages languages=es-ES#Espa\u00f1ol,en-GB#English default.language=en-GB

# Logging config
logging.level.com.openkm.edx=INFO

EDX has been tested with these databases:

  • MySQL
  • MariaDB
  • Oracle 12c
  • PostgreSQL 9
  • SQL Server 2012

See below for other databases' configurations.

The openkm.url configuration property family is also important because EDX 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
  • Go to Administration > Users and create the user-defined at edx.user configuration property. This user will be used to connect to the OpenKM instance, so double check the username and password, and make sure this user has access to the EDX base folder (the one defined at edx.base.uuid configuration property)
  • Go to Administration > Utilities > Database query and execute these SQL sentences to create some needed configuration properties:
insert into OKM_CONFIG (CFG_KEY, CFG_TYPE, CFG_VALUE) values ('edx.base.uuid', 'string', '');
insert into OKM_CONFIG (CFG_KEY, CFG_TYPE, CFG_VALUE) values ('edx.inbox.name', 'string', 'Inbox');
insert into OKM_CONFIG (CFG_KEY, CFG_TYPE, CFG_VALUE) values ('edx.public.name', 'string', 'Public');
insert into OKM_CONFIG (CFG_KEY, CFG_TYPE, CFG_VALUE) values ('edx.template.folder.inbox.uuid', 'string', '');
insert into OKM_CONFIG (CFG_KEY, CFG_TYPE, CFG_VALUE) values ('edx.template.folder.public.uuid', 'string', '');
insert into OKM_CONFIG (CFG_KEY, CFG_TYPE, CFG_VALUE) values ('edx.email.body', 'string', '');
insert into OKM_CONFIG (CFG_KEY, CFG_TYPE, CFG_VALUE) values ('edx.email.subject', 'string', '');
insert into OKM_CONFIG (CFG_KEY, CFG_TYPE, CFG_VALUE) values ('edx.url', 'string', 'http://localhost:8080/edx');
  • Set the configuration properties according to their usage:
    • edx.base.uuid: The base folder UUID where the other folders will be created.
    • edx.inbox.name: The name of the folder used to store the incoming documents. Only used if the edx.template.folder.inbox.uuid property does not exist or it's empty.
    • edx.public.name: The name of the folder used to store public documents. Only used if the edx.template.folder.public.uuid property does not exist or it's empty.
    • edx.template.folder.inbox.uuid: UUID's folder template creates the inbox folder structure.
    • edx.template.folder.public.uuid: UUID's folder template creates the public folder structure.
    • edx.email.body: Body of the notification mail.
    • edx.email.subject: Subject of the notification mail. 
    • edx.url: This is the URL where EDX will be accessible from OpenKM. 

The edx.url property usually should be "http://localhost:8080/edx" unless the application is installed on another server different from the OpenKM one. This URL will communicate from OpenKM to EDX when executing the automations and the crontab.

A minimal sample configuration would be:

  • edx.base.uuid: 688d3712-c12a-4140-be06-aefd098fe705 (use an existing folder UUID)
  • edx.inbox.name: Inbox
  • edx.public.name: Public
  • edx.url: http://localhost:8080/edx

  •  Create these automations:
    NameEventAtValidationAction

    EDX Doc Create

    Document create

    Post

    PathContains = /okm:root

    EDX Catalog

    EDX Doc Move Pre

    Document move

    Pre

    PathContains = /okm:root

    EDX Catalog

    EDX Doc Move Post 

    Document move

    Post

     PathContains = /okm:root EDX Catalog
    EDX Doc Delete 

    Document delete

    Pre 

    PathContains = /okm:root 

    EDX Catalog

    EDX Doc Update 

    Document update

    Post

    PathContains = /okm:root

    EDX Catalog

In case of problems, please check the $TOMCAT_HOME/logs/edx.log and keep in mind that a more detailed log can be achieved using the configuration at edx.properties:

# Logging config
logging.level.com.openkm.edx=DEBUG

 Don't forget to restart the service to apply these changes.

  • Once the application is configured, you can log in to http://server.ip:8080/edx with the default administrator:
    • User: admin
    • Password: admin
  • Remember to change this default password!!

Configuration for other databases

Oracle 12c

# Database
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@oracle:1521:XE
spring.datasource.username=openkm
spring.datasource.password=openkm

# JPA stuff
spring.jpa.hibernate.ddl-auto=create
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.Oracle12cDialect

# OpenKM
openkm.url=http://localhost:8080/openkm
openkm.url.preview=http://localhost:8080/openkm

# OpenKM admin user
admin.user=okmAdmin
admin.password=admin

# OpenKM edx user
edx.user=edxUsr
edx.password=s3cr3t0

# Available languages
languages=es-ES#Espa\u00f1ol,en-GB#English
default.language=en-GB

# Logging config
logging.level.com.openkm.edx=INFO

PostgreSQL 9

# Database
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://postgres:5432/okmdb
spring.datasource.username=openkm
spring.datasource.password=openkm

# JPA stuff
spring.jpa.hibernate.ddl-auto=create
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL9Dialect

# OpenKM
openkm.url=http://localhost:8080/openkm
openkm.url.preview=http://localhost:8080/openkm

# OpenKM admin user
admin.user=okmAdmin
admin.password=admin

# OpenKM edx user
edx.user=edxUsr
edx.password=s3cr3t0

# Available languages
languages=es-ES#Espa\u00f1ol,en-GB#English
default.language=en-GB

SQL Server 2012 

# Database
spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
spring.datasource.url=jdbc:sqlserver://sqlserver:1433;databaseName=okmdb
spring.datasource.username=openkm
spring.datasource.password=openkm

# JPA stuff
spring.jpa.hibernate.ddl-auto=create
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect

# OpenKM
openkm.url=http://localhost:8080/openkm
openkm.url.preview=http://localhost:8080/openkm

# OpenKM admin user
admin.user=okmAdmin
admin.password=admin

# OpenKM edx user
edx.user=edxUsr
edx.password=s3cr3t0

# Available languages
languages=es-ES#Espa\u00f1ol,en-GB#English
default.language=en-GB