Sunday, November 6, 2016

Understanding Camunda BPM at Basic Level and deploying a BPMN workflow.

Here i am trying to share some understanding for beginners by writing down a technical blog regarding
Camunda BPM
It's specially for my reference to recall and understand it at a glance whenever needed and may be this is helpful to someone else as well ;)

Camunda BPM Basics:
Camunda BPM is a JAVA based open-source framework for Business Process Management.
Camunda implements 3 different standards in the BPM and these are
  • BPMN 2.0 - Business Process Model Notation.
  • CMMN 1.1 - Case Management Model and Notation.
  • DMN 1.1 - Decision Model and Notation.
I am not elaborating this blog by describing about Camunda Modeller. Considering that Reader is already aware of that or please refer https://docs.camunda.org/manual/.
The Camunda BPM web applications are based on a RESTful architecture.
JAX-RS based Rest API, AngularJS, RequireJS, jQuery, Twitter Bootstrap are the used frameworks for it.
Camunda BPM consists with Cockpit, Tasklist, Admin section.
Cockpit -  Monitoring and operations that allows you to search for process instances, inspect their state and repair broken instances.
Tasklist - A web application for human workflow management and user tasks that allows process participants to inspect their workflow tasks and navigate to task forms in order to work on the tasks and provide data input
Admin - It allows you to manage users, groups and authorizations.

I am not going to discuss more detail about its architecture, extensions, features. Camunda BPM also helps to generates various reports to its deployed workflows.
Here i'll only discuss with BPMN diagram in brief and its simple deployment with example.

BPMN Basics:
BPMN implementation done with several components.
Like Participants (Pool, Lane), Subprocesses (Subprocess, Transaction, Event Subprocess), Tasks (Service, User, Script), Gateways (XOR, OR, AND), Events (Start, End, Termination, Message)

Designing a BPMN Diagram:

By using Camunda Modeler tool we design the required BPMN workflow diagram.
This Modeling tool is platform independent.
We also set the form variables for gateways while modelling.

Deployment Strategy:
Designing BPMN workflow Model and deploying it inside Camunda Engine is a lengthy process along with some prerequisite environment settings like Java JDK 1.7+ and Apache Maven.

Deployment steps are listed below:
  1. Installation of Camunda BPM Platform and Camunda Modeler. 
    • Download an Apache Tomcat bassed standalone distribution of the Camunda BPM platform.
    • Run Camunda by execute the script named start-camunda.bat(Windows) or start-camunda.sh (Unix).
    • In Browser Camunda will become available in this url http://localhost:8080/camunda-welcome/index.html
    • Download the latest Camunda Modeler release.
    • Modeler can then be started by running the executable named camunda-modeler.
  2. Set up an Apache Maven-based process application inside Eclipse.
    • Add Camunda Maven Dependencies to Eclipse JAVA IDE by adding some of its plugins.
  3. Model a diagram through Camunda Modeller. (https://docs.camunda.org/get-started/bpmn20/model/)
    • Create a new BPMN Diagram.
    • While creating set the task names properly for better understanding and variables for various GATEs.
  4. Generating a Project .war file and Exporting through Apache-Maven. 
    • Add a Process Application Class to the Project. 
    • Add a META-INF/processes.xml Deployment Descriptor file.
  5. Deploying and Checking a .war file inside Camunda BPM.
    • Need to move .war file from Maven project to the $CAMUNDA_HOME/server/apache-tomcat/webapps folder.
    • Test the BPMN 2.0 Process with Camunda Tasklist and Camunda Cockpit.
    • Now use Cockpit to check if the process is successfully deployed. Go to http://localhost:8080/camunda/app/cockpit
    • Start a Process Instance.
    • In Camunda Tasklist ( http://localhost:8080/camunda/app/tasklist ) click on the Start process button to start a process instance.
    • If required Configure Process Start Authorizations.
    • To Work on the Task go to Tasklist ( http://localhost:8080/camunda/app/tasklist ) and log back in with the user credentials.

Some More Information:
PHP SDK is available here http://camunda.github.io/camunda-bpm-php-sdk/ and
**If there is any change in BPMN Model/ Workflow we need to Re-Deploy inside Camunda by re-generating a new “.war” file :)

Screenshot of a Deployment of BPMN Model in Eclipse.

No comments:

Post a Comment