Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents


Introduction

Mayan Electronic Document Management System (Mayan EDMS) is an open-source document management platform designed for organizations to efficiently store, organize, and manage digital documents. It offers features such as document versioning, workflow automation, and secure access control.

Mayan DMS File Upload plugin allows user to seamlessly upload and download documents to/from Mayan EDMS. There are three components of this plugin.

  • Mayan File Upload - Upload & Download
  • Mayan Option Binder - Allows user to populate the values of Document Types, Cabinets and Tags from Mayan EDMS.
  • Mayan File Formatter - Allow user to format the filename and download the file directly from the datalist.


This plugin is created with the use of REST API — Mayan EDMS Documentation to perform RESTful API calls on Mayan EDMS.

Plugin Setup

1. Obtain the Plugin

 Get the plugin jar file from https://github.com/jogetoss/sp-saml-directory-manager

2. Upload the Plugin

Upload the plugin jar file in Joget by going to Settings → Manage Plugins → Upload Plugin

Mayan Option Binder

Configure Mayan Option Binder

Image Removed

Figure 1 : Mayan Option Binder Configuration

Name

Description

Options

Header field.

Option *

The type of dashboard that is shown to the user.

  • Cabinets

  • Document Types

  • Tags

Add Empty Option

Checkbox. If true, creates an empty option with label configured in next field.

Empty Option Label

Text field to determine label for empty option.

Example: "Please Select"

Credentials

Header field.

Server URL *

The URL that Mayan EDMS is hosted at.

Example: http://localhost

Username *

Mayan EDMS username. 

Password *

Mayan EDMS password.

Mayan File Upload

Configure Mayan File Upload

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

Below are configurations for section "Mayan EDMS Settings":
Image Removed
Figure 2: Mayan EDMS Settings for Mayan File Upload Plugin

Name

Description

Credentials 

Header field.

Server URL *

The URL that Mayan EDMS is hosted at.

Example: http://localhost

Username *

Mayan EDMS username. 

Password *

Mayan EDMS password.

Fields Mapping

Header field.

Form *

The current form to bind the fields with.

Document Type *

The selected form field that contains the Document Type value.

Cabinet 

The selected form field that contains the Cabinet value.

Tag

The selected form field that contains the Tag value.

Expected Outcome


Getting Started

Prerequisites

Mayan File Formatter

Configure Mayan File Formatter

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

Below are configurations for section "Configure Mayan EDMS File Formatter":
List --> mayan_file_upload column --> formatter --> Mayan DMS File Formatter 
Image Removed
Figure 3: Mayan EDMS File Formatter Configuration

Name

Description

Enable File Download

Checkbox field. If true, enables file download.

Credentials 

Header field.

Server URL *

The URL that Mayan EDMS is hosted at.

Example: http://localhost

Username *

Mayan EDMS username. 

Password *

Mayan EDMS password.

Setting up Mayan EDMS

The easiest way to use Mayan EDMS is by using the official Docker image. You need to have Docker properly installed and working before attempting to install Mayan EDMS.

Please follow the below instructions to set up Mayan EDMS.

Docker Compose installation

  1. Install Docker:
    Code Block
    languagejava
    wget -qO- https://get.docker.com/ | sh

    If you don’t want to run an automated script, follow the instructions outlined in their documentation: https://docs.docker.com/install/

  2. Download the Mayan EDMS Docker Compose files:
    The files are located at: https://gitlab.com/mayan-edms/mayan-edms/-/tree/master/docker/
    Code Block
    languagejava
    curl https://gitlab.com/mayan-edms/mayan-edms/-/raw/master/docker/docker-compose.yml -O
    curl https://gitlab.com/mayan-edms/mayan-edms/-/raw/master/docker/.env -O


  3. Launch the Mayan EDMS Docker Compose containers:

    Code Block
    languagejava
    docker compose up --detach


Please refer to Installation and Additional customization original installation documentation and any additional customization instructions for downloading and installing the desired version for your system

For this example, OpenKM is run on Docker with Linux using Docker Compose.


When you see the following page http://localhost/authentication/login/, it shows that your Mayan EDMS has been successfully hosted. Login with the automatic credentials shown in the page. 

Figure 4: Mayan EDMS Login Page


After logging in, you will see the homepage of Mayan EDMS.

Figure 5: Mayan EDMS Homepage

Configuring the Mayan EDMS Plugin


Mayan Option Binder

Configure Mayan Option Binder

Drag three select boxes respectively, known as Document Types, Cabinets, and Tags. For all the three select boxes, use the Mayan Option Binder to load the values respectively from Mayan.

Image Added
Figure :

Make sure to apply basic validator to the select box Document types. 




Figure 6: Mandatory select box Document types


 Fill Fill in the required credentials for the plugin to work as intended. 


Figure 7: Joget Form Builder (Select Box with Mayan Option Binder)


Name

Description

Options

Header field.

Option *

The type of dashboard that is shown to the user.

  • Cabinets

  • Document Types

  • Tags

Add Empty Option

Checkbox. If true, creates an empty option with label configured in next field.

Empty Option Label

Text field to determine label for empty option.

Example: "Please Select"

Credentials

Header field.

Server URL *

The URL that Mayan EDMS is hosted at.

Example: http://localhost

Username *

Mayan EDMS username. 

Password *

Mayan EDMS password.


Mayan File Upload Plugin Configuration

Configure Mayan File Upload

Drag Then, drag and drop the Mayan File Upload Element to to attach into the form as a form element. More details on default configurations for file upload: File Upload - Knowledge Base for DX 8 - Joget | COMMUNITY

Below are configurations for section "Mayan EDMS Settings" in the Mayan File Upload form element

Enter the credentials previously obtained during the login process for Mayan EDMS in order to establish a connection. In the Fields Mapping section, we can now map the select box fields respectively 

Figure 8: Joget Form Builder (2: Mayan EDMS Settings for Mayan File Upload )form Element

Figure 9: Required Credentials


Name

Description

Credentials 

Header field.

Server URL *

The URL that Mayan EDMS is hosted at.

Example: http://localhost

Username *

Mayan EDMS username. 

Password *

Mayan EDMS password.

Fields Mapping

Header field.

Form *

The current form to bind the fields with.

Document Type *

The selected form field that contains the Document Type value.

Cabinet 

The selected form field that contains the Cabinet value.

Tag

The selected form field that contains the Tag value.



Mayan File Formatter

Configure Mayan File Formatter

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

Below are configurations for section "Configure Mayan EDMS File Formatter":
List --> mayan_file_upload column --> formatter --> Mayan DMS File Formatter 

Image Added

Figure 3: Mayan EDMS File Formatter Configuration

Name

Description

Enable File Download

Checkbox field. If true, enables file download.

Credentials 

Header field.

Server URL *

The URL that Mayan EDMS is hosted at.

Example: http://localhost

Username *

Mayan EDMS username. 

Password *

Mayan EDMS password.




In the datalist builder, we can format the file upload column by using the Mayan File Formatter. Similar configurations can be key in to enable users to download the file directly from datalist.

 

List → mayan column →  formatter →  Mayan DMS File Formatter →Configure Mayan EDMS File Formatter

Figure 9: Joget Form Builder (Mayan File 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 Mayan Plugin

After all the configurations has been done, the user can retrieve the Document Types, Cabinets, and Tags from Mayan EDMS in the select boxes, then choose a file to upload.

Figure 10: Mayan EDMS UI (Form)


After uploading, we can download the file retrieved from Mayan in the datalist using the formatter.

Figure 11: Mayan EDMS UI (List)


At Mayan EDMS, 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: Mayan EDMS 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.