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

Compare with Current View Page History

« Previous Version 19 Next »


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 users 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 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 REST API — Mayan EDMS Documentation as documented in the Mayan EDMS Documentation to perform RESTful API calls.

Plugin Info

Plugin Available in the Bundle:

  1. Mayan DMS File Upload

This plugin bundle is compatible with Joget DX 8.

Expected Outcome

Upon successful configuration, Joget will have the capability to upload files to Mayan EDMS, enabling users to seamlessly upload and download documents to and from the system.

Figure 1: Example of successful integration


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.

Setting up Mayan EDMS

Installation Steps

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/

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.

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


Example

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.


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 login at 
http://localhost/authentication/login/.


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

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

  • Username: admin
  • Email: autoadmin@example.com
  • Password: (a generated password)

Figure 2: Mayan EDMS Login Page

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

Figure 3: Mayan EDMS Homepage

Creating Documents types, Tags, and Cabinets in Mayan EDMS

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


Mayan Option Binder

Configure Mayan Option Binder

Create a form, please visit Designing a Form for more information on how to design a form.
Drag three select boxes in the form 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 the basic validator to the 'Document Types' select box.

Document Types Select Box → Advanced Options → Validator → Basic



Figure 4: Mandatory select box Document types

Provide the necessary credentials in the 'Mayan EDMS Settings' section for the three select boxes: 'Document Types', 'Cabinets', and 'Tags'. The credentials include the server URL where Mayan EDMS is hosted, and the username and password for an account with appropriate permissions. These details will enable the plugin to communicate with the Mayan EDMS and function as intended.

Figure 5: Joget Form Builder (Select Box Mayan EDMS 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 6: Mayan EDMS Settings for Mayan File Upload form Element

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

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.

Below are configurations for section "Configure Mayan EDMS File Formatter":

List --> mayan_file_upload column --> formatter --> Mayan DMS File Formatter 



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

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, please refer to App Variable.

Using the Mayan Plugin

After all the configurations have 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.


Figure 9: Create Cabinet in Mayan EDMS

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

Upload a file

Figure 11: Mayan EDMS UI (Form)

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

Figure 12: 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 13: 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.


  • No labels