Checking Out Camunda: Replacing the Old BPMS Legacy System
Analyzing and replacing the heavyweight old BPMS legacy system with REST based workflow engine, Camunda.
Join the DZone community and get the full member experience.Join For Free
Traditional BPM or tightly coupled application although designed in accurate way but over the time due to addition of new functionality and lack of old version product support usually it ends up with the following problems:
- Heavyweight system that is hard to install and to maintain.
- Closed architecture, hard to integrate with existing technology stack.
- Required their proprietary approach to application development, disliked by software developers and limited in flexibility.
- Lack of support for BPMN, or missing features and tools.
- Issues with performance and scalability.
- Difficult to get qualified, affordable professional services.
- Total Cost of Ownership (TCO) too high, in part due to high maintenance fees.
As a result, only BPMS replacement or redesigned option remains.
Issues With Replacement Approach
While looking at replacement or redesigned approach first thing come in mind is cost and implementation flexibility with modern architecture. How to bind the orchestration engine with micro-service? It should leverage workflow, ordering of activities, handling of timeouts, complex business transactions, or other cool features. In the future, it should be easily replaceable with other orchestration engines.
Other BPM vendors provides the solution but the platform provides plug in, own functionalities and extensions but all this is done in Java.
How Can Camunda Help With the Above Problems?
The Open Source BPM platform Camunda serves these use cases very well. It is easy to run Camunda without any Java knowledge and set up an architecture to code in the language of a particular choice. Camunda can be used as a standalone process engine server or embedded inside custom Java applications. For high availability and scalability, Camunda can run on a distributed cluster while relying on one shared database.
The core advantages of Camunda BPM compared to other BPM solution are the increased flexibility, the usage of standard technologies and knowledge, reduced licensing costs and an accelerated software development process.
- Introduces the basic architecture and alternative
- BPMN modeling
- Introduces the Camunda REST API,
- Existing client libraries for languages other than Java,
- Example using C# and Node.JS
- describes ways to run a Camunda server (Docker or Tomcat).
Camunda is written in Java and needs a Java Virtual Machine (JVM) to run. Camunda provides a REST API which allows to code in whatever language and just talk REST with Camunda:
There are below alternatives with which we can build the architecture with workflow engine
- Asynchronous communication by commands and events (normally using a message or event bus)
- Point-to-point communication by request/response (often REST)
- Work distribution by workflow engine
Workflows in Camunda are defined in BPMN which is basically an XML file. It can be graphically modeled using the Camunda Modeler. Camunda supports BPMN 2.0 so it is easy to migrate existing BPMN process from one another BPMN product to Camunda directly with Cawemwo or modeler.
- Cawemo is BPMN process specification platform of the Camunda stack. Its main purpose is to enable to stakeholders to model and collaborate on business process diagram.
- The flow diagram is the bridge between business and technical team which gives the ability to draw business flows minus technical details.
- Created BPMN further implement in separate parts by using various multiple nodes which actually build the orchestration. For detail please refer example shown in above diagram
Deploy the Process
Camunda provides REST API to deploy and start the process as follows:
- One can leverage the REST API to deploy the process model. Create BPMN process file and save it with the name test.bpmn and start Camunda with tomcat or via Docker to have it available on "localhost:8080"
- Now with the above API process, it will deploy to start same process refer below REST example.
Find below the reference of available client libraries in Camunda:
- Java: https://github.com/camunda/camunda-external-task-client-java
- C#: https://github.com/salajlan/camundacsharpclient and https://github.com/berndruecker/camunda-dot-net-showcase .
Both initiatives are in an intermediate state and rather inactive but can serve as a good starting point.
Example With C#
Run Camunda on Tomcat
To setup Tomcat and install Camunda into it, following the installation description. This gives the freedom to use whatever Tomcat version you prefer or e.g. install it as a Windows service.
Custom Docker Image With “Camunda standalone WAR”
As an alternative to the pre-built Docker image from Camunda we can also prepare Tomcat yourself extensive additional requirements and are capable of setting up a Java build environment, which can even customize this Camunda standalone war.
The easiest way to run Camunda is using Docker.
The Dockerfiles and some documentation (e.g. how to connect that with the databases choice) is available on Github:
- One can also build the docker image basing on a proper Tomcat distribution.
Opinions expressed by DZone contributors are their own.