4WS.Platform & Activiti BPM
BPMN or Business Process Model and Notation is a standard used to describe internal processes of an organization and to provide a graphical representation for a shared procedure, managed by the involved employees and services, in order to optimize the efficency of the procedure.
A Business Process Model can be applied to cover a variety of needs, including reminders, timeouts, replacements, email notifications, etc.
Using a Business Process Model in a large and complex process makes it possible to get a high efficency, especially for these reasons:
- easy to use and learn;
- higher execution speed of the procedure;
- reduction in the execution time of the whole process;
In order to allow the definition and management of complex business processes using a unique front-end, the Activiti BPM engine and designer have been embedded into 4WS.Platform EE, a Rapid Application Development solution, also available with an open source license (click to see available licenses) and able to create web applications including BPM processes.
Activiti is considered one of the best BPM open source engines.
However, if used as a stand alone product, it has a few weaknesses:
- lack of a document management system inside a process: there is not the support of document versioning, storing and searching for documents forwarded to an external CMS
- a poor and not very user friendly GUI: the provided user interface is quite rigid and not focused on the final user needs
- a poor data validation: the supported data format includes only text, numbers, fixed enumeration and dates, not validated data through a dynamic list of values, nor translated data.
These weak points have been already successfully addressed in 4WS.Platform, so that the embedding of Activiti takes advantage of the 4WS.Platform features, including a high level of customization at GUI and business logic level.
The main advantages provided by this integration are:
- document storing and sharing can be delegated to 4WS.Platform or other extensions, including Alfresco CMS
- an alternative and better customizable user interface can replace the native GUI provided by Activiti
- a larger set of graphics components are available through 4WS.Platform, including data validation, mandatory fields, additional data types, supported both at the web GUI and at the database layer.
Thanks to this integration, 4WS.Platform allows to design and configure web and mobile applications with a high level of customization and this is due to the availability of the business processes too, managed at business and GUI levels.
From theory to practice
Now it is time to move from theory to a real example of how to manage processes through 4WS.Platform, which makes it possible to graphically design a business process and monitor its execution, step by step, until its end.
Let’s start from the Administration -> Activiti menu available in the 4WS.Platform Web Designer. This menu is composed of these functionalities, all related to the BPM management:
- To do list
Starting from this menu item, it is possible to create new processes and show the list of already designed processes. Through this menu processes can also be started manually, along with input data required when starting the process.
A new process can be created in two alternative ways:
- by importing a file in ‘.bpmn’ format, which defines a business process; this file can be created externaly, for instance through a stand alone designer available as an Eclipse plugin;
- by using the Activiti Modeler, included in 4WS.Platform; this modeler has a web front-end embedded in 4WS.Platform that can be used to graphically design a process and create a model; models can then be converted to active processes; all these operations can be managed internally to 4WS.Platform.
The web modeler can be accessed starting from the list of models when choosing a model, or by pressing the new model button.
A more detailed description of how to use the Activiti web modeler can be found in its project documentation (http://www.activiti.org/).
Another way to create a new model is through the duplication of an already existing process and then use the web modeler to change the copy.
Finally, it is always possible to create a ‘.bpmn’ file by exporting a model, for instance with the goal of creating a backup copy of the process.
Once completed the process definition and converted the model to an active process, the process selection will show its detail, composed of the process name, version and the picture representing the process definition.
The process detail includes also a button to start the process and optionally fill in the variables involved with the starting task.
This variables pane is configurable through the 4WS.Platform’s Web Designer, since it is managed like any other configurable panel defined within Platform.
After starting a process, the process execution is showed in the instances list, which is composed of 3 sections:
- Process versions, reporting the versioned processes list, having at least one active instance;
- Process executions, showing all active instances or only instances related to the selected process in the first list;
- the detail pane on the right reports several information about the process execution: the graphical representation of the process and the exact task currently in execution/waiting state; for that task, several information are available: name, process, assignee, expiration time, as well as the process and task variables with their value.
This feature reports the list of tasks potentially assigned to the current user and the list of already assigned tasks.
When selecting a task from the first list (tasks potentially assigned), the user can assign to himself that task or assign it to another user compatible with that task, i.e. belonging to the same group of users potentially assigned to that task.
When selecting an already assigned task, the panel on the right will show the list of variables and let the user to set the values for those variables.
Once completed a task, it can be closed to move forward the process execution. Another way to close a task is through other Platform functionalities, which can automatically close a task when a specific event is fired.
Every completed process is showed within the History functionality, whose operation is similar to the Instances feature.
4WS.Platform and the Activiti BPM engine have been fully integrated with each other.
Thanks to that, 4WS.Platform has become an ideal tool for those organizations who want to develop web and mobile applications autonomously by taking advantage all the features provided by this union, as well as the high level of customization available and the continuos improvement of this solution.
To sum up, Activiti and 4WS.Platform make it possible to manage business processes, including simple features such as email notifications or documents approval/storage and they also allow administrator to get a full control and monitoring of processes defined and in progress.