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

Expected Outcome

The expected outcome is that users should be able to seamlessly interact with Mayan EDMS through Joget including uploading and downloading documents, populating select boxes with data from Mayan EDMS, and formatting files retrieved from Mayan EDMS.

Getting Started

Prerequisites

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 41: Mayan EDMS Login Page

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

Figure 52: Mayan EDMS Homepage


Mayan Option Binder

Configure Mayan Option Binder

Drag Create a form and 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. 
Select Box→ or Load Data From → Mayan Option Binder → Mayan EDMS Settings


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

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

Document Types Select Box → Advanced Options → Validator → Basic


Figure 64: Mandatory select box Document types


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

Figure 75: Joget Form Builder (Select Box with Mayan Option BinderEDMS Settings 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 Plugin Configuration

Configure Mayan File Upload

Drag and drop the Mayan File Upload Element 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 automatic 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 26: Mayan EDMS Settings for Mayan File Upload form Element

Figure 9: Required Credentials7: Mayan EDMS Settings 


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 



Figure 38: 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.




Mayan File Formatter

In the datalist builder, we can format the file upload column by using theMayan 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 | COMMUNITYto App Variable.


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.

For Instance if we create a cabinet in the Mayan EDMS, we can retrieve the Cabinets information in the Cabinets selectbox see Figure 10.

Image Added

Figure 10: Create Cabinet in Mayan EDMS

Image Added

Figure 11: Displaying cabinet information from Mayan EDMS within the Joget form interface

Upload a file

Image AddedImage Removed

Figure 10: Mayan EDMS UI (Form)


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

Image RemovedImage Added

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.

Image RemovedImage Added

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.