You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »


Introduction

The OpenKM Document Management System (DMS) plugin facilitates the seamless integration of OpenKM and Joget. This integration currently utilises two plugin types:

  • Form Options Binder - Retrieve folder paths from OpenKM.
  • File Upload Element - Upload files to OpenKM. Bind folder paths from the select box field that uses the Form Options Binder. Able to choose whether to create folder that follows Joget form ID when uploading.
  • Datalist Formatter - Format datalist file upload column to download file from OpenKM directly.


The plugin is created with the use of RESTful Guide - OpenKM Documentation to perform RESTful API calls on OpenKM.

The plugin source code is available in JogetOSS.


OpenKM DMS Form Options Binder Properties

Configure OpenKM DMS Form Options Binder

Name

Description

Credentials 

Header field.

Username *

OpenKM username. 

Password *

OpenKM password.

OpenKM URL *

The URL that OpenKM is hosted at.

Example: http://localhost:8180/OpenKM

Root Folder UUID *

The folder UUID retrieved from OpenKM folder. The UUID can be configured depending on desired folder level to start with.


OpenKM DMS File Upload Properties

Configure OpenKM DMS File Upload

More details on default configurations for file upload: File Upload - Knowledge Base for DX 8 - Joget | COMMUNITY

Below are configurations for section "OpenKM Configurations":

Name

Description

Credentials

Header field.

Username *

OpenKM username. 

Password *

OpenKM password.

OpenKM URL *

The URL that OpenKM is hosted at.

Example: http://localhost:8180/OpenKM

Field Mappings

Header field.

Form

The current form to bind the field with.

Field for OpenKM Folder Path Upload

The selected form field that contains the OpenKM File Path value.

Automatically Create Folder by Form ID

Checkbox field. If true, file will be uploaded inside a newly created folder using submitted form ID in OpenKM. If false, file will be directly uploaded into the OpenKM File Path.

Uncheck the field if you are not configuring "Field Mapping" which is using the default path("/okm:root"). 


Checking the field will create a different path in OpenKM and Joget. OpenKM will store it in a Unique ID path, while Joget will store the file path as '/okm:root'. The difference in paths may result in an HTTP Status 500 Error when attempting to download the file from Joget.



OpenKM DMS Datalist Formatter Properties

Configure OpenKM DMS Datalist Formatter

Name

Description

Credentials

Header field.

Username *

OpenKM username. 

Password

OpenKM password.

OpenKM URL *

The URL that OpenKM is hosted at.

Example: http://localhost:8180/OpenKM

Field Mappings

Header field.

Form

The current form to bind the field with.

OpenKM Path for File Upload

The current column field that contains the OpenKM File Path value.



Setting up OpenKM DMS

Please refer to Download OpenKM to download the desired version for your system. 


For this example, OpenKM is run on MacOS with Java 8.0.382-zulu and MySQL5.7.


When you see the following page, it shows that your openKM has been successfully hosted. Login with the default credentials "okmAdmin" with password "admin".

Figure 1: OpenKM Login Page


After logging in, you will see the homepage of OpenKM.

Figure 2: OpenKM Homepage


Troubleshooting OpenKM DMS

List of Troubleshooting

Database Connection

When this application error occurs, there is a problem with the database connection due to lack of User's privileges in database.

Figure 3: OpenKM Database Connection Error

Database Connection Solution

  1. Open MySQL root instance.
  2. Go to Server tab > Users and Privileges.
  3. Give full permission to user "openkm".

Figure 4: OpenKM Database Connection Error

Database Unable to Execute Query

This is a follow up error after solving the previous. 

Figure 5: Database could not execute query


Error in Figure 5 occurs because there is no existing openKM UUID in the database. In order to resolve the problem we need to create a UUID when accessing openKM page.

Database Unable to Execute Query Solution 

  1. Go to tomcat[version] > OpenKM.cfg file.
  2. Change a line of codel:

    Command Prompt
    hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
    hibernate.hbm2ddl=create //Value before is "none"
  3. Restart OpenKM service.


Configuring the OpenKM Plugin

First, drag a select box and use the OpenKM DMS Form Options Binder to load the folder paths from OpenKM. Fill in the required credentials for the plugin to work as intended (Figure 6). The Root Folder UUID can be retrieved on the OpenKM folder that we intend to configure as root folder (Figure 7).

Figure 6: Joget Form Builder (Select Box with OpenKM DMS Form Options Binder)


Figure 7: Retrieve OpenKM Root Folder UUID 


Then, the OpenKM DMS File Upload tool can be drag and drop to attach into the form as a form element. Fill in the OpenKM Configurations with necessary details. If the credentials of OpenKM is invalid, "Authentication ERROR" will be shown in the element (Figure 8).

We can now map the select box field in the Field Mappings section. Field mappings is an optional configuration.

When configuring the Field Mapping, "Field for OpenKM Folder Path Upload" must point to the file path created in Figure 6, if no fields are mapped, the default file path will be "/okm:root".

Figure 8: Joget Form Builder (OpenKM DMS File Upload Element)


In the datalist builder, we can format the file upload column by using the OpenKM DMS Datalist Formatter. Similar configurations can be key in to enable users to download the file directly from datalist. Make sure the "file path" fields are in the datalist (can be configured to be hidden if we do not wish to show, but it must be there). If field mapping is not configured, the default file path will be "/okm:root".

Figure 9: Joget Form Builder (OpenKM DMS Datalist Formatter)


If we do not wish to type the credentials multiple times, the credentials can also be easily added into environment variables, and then use a hash variable to refer to the values in environmental variables. For more information, please refer to Environment Variable - Knowledge Base for DX 7 - Joget | COMMUNITY.


Using the OpenKM Plugin

After all the configurations has been done, the user can retrieve the folder paths from OpenKM in the select box, then choose a file to upload.

Figure 10: OpenKM DMS UI (Form)


After uploading, we can view the latest file path that the file has been uploaded to, and also download the file retrieved from OpenKM.

Figure 11: OpenKM DMS UI (List)


At OpenKM DMS, we can view the file being uploaded. If we modify the file here, we can also get the modified newest file in Joget.

Figure 12: OpenKM DMS Homepage with Uploaded File


To upload multiple files and other file upload features, please visit File Upload - Knowledge Base for DX 8 - Joget | COMMUNITY for further information.


  • No labels