/erpnext-camundabpm-integration

A javascript based API to communicate ERPNext with Camunda Zeebe and use its Microservice Orchestration over Doctype processes.

Primary LanguageTypeScript

erpnext-camundabpm-integration

Stack

File structure (DEMO)

THIS/
 │
 ├── Folder Example...
 │   ├── File Example...
 │   ├── File Example...
 │   └── File Example...
 │
 ├── .gitignore
 └── README.md

Introducción

Este proyecto fue creado con el fin de crear un ecosistema que integre dos herramientas muy conocidad, la cuales son ERPNext y Camunda BPM. Esto es debido a que no existe, hasta el momento, manera alguna de unir estas dos herramientas para poder utilizarlas dentro de un mismo contexto.

Incio como un proyecto escolar para Proyectos Computacionales en la carreara de Ingeniería en Sistemas Inteligentes, en la UASLP.

Este repositorio fue creado para albergar todo lo necesario para instanciar el stack ERP-BPM además de los microservicios necesarios para iniciar la comunicacion entre los dos recurso.

A continuación, se explicara la manera de implementar, instanciar y utilizar el ecosistema completo.

Prerrequsitos

Los requisitos necesarios para ello son los siguientes:

Implementation Details

In order to implement a ready to test environment of tecnologies used in this project we need cover the configuration steps in the next sections.

We going to need get the main stack that results after cloning the repository using git (download), then we configure the environment with Docker (how to install) and YAML files.

For some implementations, tecnologies, modifications and more is necessary that we install NodeJS in our computer.

ERPNext environment

In order to install and configure a local ERPNext client we can follow the next steps. To see other options and details about a more complete configuration for the environment see ERPNext installation.

  1. Cloning the repository for ERPNext client
git clone https://github.com/frappe/frappe_docker.git
  1. Move to the repo directory.
cd frappe_docker
  1. Copy the example docker environment file to .env
cp env-local .env
  1. Start docker containers with the name of your proyect. This step can take minutes to be ready.
# docker-compose --project-name <project-name> up -d
  1. The default user is Administrator and password $ADMIN_PASSWORD.

Zeebe environment and Camunda client

Now to configure the environment for Zeebe local client we need to follow the next steps. Also we can see a more complete configuration at Zeebe.

  1. Clone repository for Zeebe
git clone https://github.com/zeebe-io/zeebe-docker-compose
  1. Move to operate folder in repository folder
https://github.com/AngelAngelopoulos/ERPNext-CamundaBPM-Integration/wiki/Zeebe-Environment
  1. Run docker containers
docker-compose up
  1. Now we can easily access to Docker Desktop on "Images" section and run camunda/operate to start the local client of Camunda Cloud with Zeebe.

  2. Finally we can access to http://127.0.0.1:8080/login in our navigator to access the local client. Default user is demo and password is demo.

Camunda Modeler

To achieve implement a process in the Camunda client is necesary design a diagram that represent the flow of the process using BPMN a graphical notation to design business processes. Camunda Modeler is a tool from Camunda that help us to create our process diagrams and simplify deployment on Camunda client.

For a demo we use two process examples: (ACTUALIZA ENLACES)

Note: The BPMN language suported on Camunda differs from Camunda Cloud because have different workflow engines, both supported by community and may have more features in future relases. See the actual BPMN elements alowed latest relase for Camunda Cloud.

Hasura

To install Hasura its requiredhave Docker installed and configured, this will be our Microservice trigger, when a new Patient (or another Entity) is created, Hasura activates an Event, this is a webhooks that sends a POST message to an endpoint (our service start-process) and initiates the process in Camunda BPM, in operate portal we shall be the new instance of the process

Microservice Core

You can instantiate the functions in the Cloud using Openfaas (see the Installation Guide) or AWS lambda (see our Implmenetation Guide) in each case, it can be achieved using a Multiservice gestor, so, this can be used as trigger for the functions, using Javascript to create Microservices, then, is is the API and the endpoints start-process and send-message

Contribution