Mayan EDMS

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 facilitates a seamless process for users to upload documents from Joget to Mayan EDMS. Once uploaded, these documents become accessible within Mayan EDMS, where users can subsequently download them as needed.. There are three components of this plugin.

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

This plugin is created using the REST API — Mayan EDMS Documentation as documented in the Mayan EDMS Documentation to perform RESTful API calls.

Plugin information

  • Plugin Available in the Bundle: Mayan DMS File Upload
  • This plugin bundle is compatible with Joget DX 8.

Getting started

Prerequisites

The prerequisite for this plugin is to have Docker installed on your system. Docker is essential because the easiest way to deploy Mayan EDMS is through its official Docker image. Before attempting to install Mayan EDMS, ensure that Docker is properly installed and operational.

Where to get the plugin

You can download the Mayan EDMS plugin from the JogetOSS Github Repository.

How to install

  1. Click Download on this plugin screen (It will be a .jar file).
  2. Go to your Joget localhost or server. In the Joget Console, go to Admin Bar > Systems Settings > Manage Plugins and click the Upload Plugins button.
  3. Under Upload Plugin, select the plugin .jar file you downloaded and click Upload.
  4. Depending on the plugin type, you can now view your new plugin in your form, List, or UI Builder.
  5. Remember to uninstall the old plugin before uploading a new version.
  6. The Joget Knowledge Base has more information on managing and developing plugins.

How to use it

Setting up Mayan EDMS

  1. Install Docker: Open a terminal and run the following command to install Docker.
    wget -qO- https://get.docker.com/ | sh

    Note:
    If you prefer not to use an automated script, you can follow the installation instructions provided in the Docker documentation https://docs.docker.com/install/

  2. Download the Mayan EDMS Docker Compose files: Mayan EDMS provides Docker Compose files for easy setup. Run the following commands to download the necessary files:
    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
    

    These commands will download the docker-compose.yml and .env files required for the Docker Compose setup.

    Note that Administrative rights in the Command Prompt (CMD) are required to execute this action on Windows.
  3. Launch Mayan EDMS using Docker Compose: With the Docker Compose files in place, run the following command to start Mayan EDMS:

    docker compose up --detach

    Note:
    See Installation and Additional customization original installation documentation and any additional customization instructions for downloading and installing the desired version for your system.

Login to Mayan EDMS

After you have installed Mayan EDMS using Docker and Docker Compose on a Linux system, confirm the installation by accessing the login page.

You can log in at http://localhost/authentication/login/.

Once Mayan EDMS has been successfully hosted, you will be able to see the login page.

You can now log in using the automatically generated credentials provided below. Typically, you will find:

  • Username: admin
  • Email: autoadmin@example.com
  • Password: (This is automatically generated)

Note that these credentials will remain the same for all subsequent logins unless you update them.

After logging in with the automatically generated credentials, you will see the homepage of Mayan EDMS.

Creating documents types, tags, and cabinets in mayan EDMS

To efficiently use the Joget integration with Mayan EDMS, you must first set up your document organizational structure within Mayan EDMS. Here is how to create document typestags, and cabinets:

Creating a document type
  • Click on the System menu in the upper right corner of the Mayan EDMS homepage.
  • From the drop-down, select Setup.
  • In the Setup menu, find and click Document types to manage types of documents.
  • In the Document types section, click on the Actions button at the screen's top-right corner. 
  • Type the name of the new document type in the Label field.
  • Click the Save button to finalize the creation of the new document type.
Creating a tag
  • Go to the navigation menu on the left-hand side of the screen.
  • Click on the Tags section to expand it if it has not already expanded.
  • Within the Tags section, you will see the option to Create new tag. Click on this option to create a new tag.
  • After clicking on the Create new tag option, in the Label field, enter the name you want to give to your new tag.
  • After filling out the details, click the Save button to create your new tag.
  • After a new tag has been successfully created in Mayan EDMS, you can see it listed under the 'Tags' section.
  • Select All to display all tags that have been created in the system.
  • In the list of tags, you will find your newly created tag, labeled as you have named it during creation.
Creating a cabinet
  • Go to the navigation menu on the left-hand side of the screen.
  • Click on the Cabinets section to expand it if it has not already expanded.
  • Within the Cabinets section, you will see the option to Create a cabinet; click on this option to create a new one.
  • After clicking on the Create cabinet option, in the Label field, enter the name you want to give to your new cabinet.
  • After a new cabinet has been successfully created in Mayan EDMS, you can see it listed under the Cabinets section.
  • Select All to display all cabinets that have been created in the system.
  • In the list of Cabinets, you will find your newly created cabinet, labeled as you have named it during creation.

    You are done setting up Mayan EDMS and will now proceed to set up this plugin in Joget.

Setup mayan EDMS plugin

In the Joget Form Builder, drag and drop three select box form elements onto your form. Name them Document TypesCabinets, and Tags, respectively. Then, configure each select box to use the Mayan Option Binder, which will populate them with the corresponding document types, tags, or cabinets from Mayan EDMS.
In the Mayan EDMS Settings section, navigate to the Options field for each select box. Use the dropdown menu to select the option name that matches with your selectbox. This will map the respective data from Mayan EDMS with the selectbox.

For instance, for the Document types selectbox, in the options field, choose document Types. Ensure to make this selectbox a required field.

Similarly, for the Tag and Cabinets select box, choose Tags and Cabinets in the Options field dropdown menu, respectively.
Next, input the required credentials to all the select boxes to ensure the plugin functions properly. These are the same usernames and passwords you use to log into Mayan EDMS, as shown in the login to Mayan EDMS.

If you wish to avoid entering the credentials multiple times, you can add them to App variables and then use a hash variable to reference the values. For more information, see App Variable.

After this, 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.

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

Enter the previously obtained credentials 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.
In the List Builder, you can format the file upload column using the Mayan DMS File Formatter. Similar configurations can be key in to enable users to download the file directly from datalist.

Mayan file upload plugin demo

Upload file

Once all configurations have been completed, the user can retrieve the Document TypesCabinets, and Tags from Mayan EDMS in the select boxes, then choose a file to upload.

Once the file has been uploaded through the Joget, you can verify the document types, tags, and cabinets to which it has been assigned in Mayan EDMS. Additionally, the file can be directly downloaded from within the Mayan EDMS interface.

At Mayan EDMS, you can view the file being uploaded. If we modify the file here, you can also get the modified newest file in Joget.
To upload multiple files and other file upload features, see File Upload for further information.

Delete file

If the "Delete Actual File During Overwrite or Removal?" checkbox is checked, when the user deletes the file, the actual file in Mayan will also be deleted.Click on Remove file and save the form again.

You will see in Mayan that the document has been removed.

At Joget, the document has also been deleted. Please note that deleting the entire record in datalist does not mean deleting the file.

Configure mayan option binder properties

Options
  • Option: The type of dashboard that is shown to the user.
    • Cabinets
    • Document Types
    • Tags
  • Add Empty Option: Checkbox. If true, create an empty option with a label configured in the next field.
  • Empty Option Label: Text field to determine the label for empty option.

    Example: Please Select

Credentials
  • Server URL: The URL at which Mayan EDMS is hosted.
    Example: http://localhost
  • Username: Mayan EDMS username. 
  • Password: Mayan EDMS password.

Configure mayan file upload properties

More details on default configurations for file upload.

Below are configurations for the section Mayan EDMS Settings:

Credentials
  • Server URL: The URL at which Mayan EDMS is hosted.
    Example: http://localhost
  • Username: Mayan EDMS username. 
  • Password: Mayan EDMS password.
 Fields mapping
  • Form: The current form with which to bind the fields.
  • 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.

Configure mayan DMS file formatter

  • Enable File Download: Checkbox field. If true, enables file download.
Credentials
  • Server URL: The URL at which Mayan EDMS is hosted.
    Example: http://localhost
  • Username: Mayan EDMS username. 
  • Password: Mayan EDMS password.

If you wish to avoid entering the credentials multiple times, you can add them to App variables and then use a hash variable to reference the values. For more information, see App Variable.

Mayan EDMS on Cloud
To utilize the Mayan EDMS Plugin on Joget Cloud, it's essential to deploy Mayan EDMS on the cloud as well to ensure online accessibility.
If the Mayan EDMS Plugin is hosted on the cloud while Mayan EDMS remains on a local server, Joget won't be able to access Mayan EDMS. As a result, select boxes within Joget will display empty options, impacting the intended functionality of the plugin.

Expected outcome

After successful configuration, Joget will be able to upload files to Mayan EDMS, allowing users to seamlessly upload and download documents to and from the system.

Related documentation

Download plugin

Download sample app

Download the demo app for Mayan EDMS:
Created by Julieth Last modified by Aadrian on Nov 19, 2024