first question that crossed my mind was “why a new BPM engine”? Basically, there are some reservations about the jBPM Alfresco implementation in the areas of developing and controlling processes. Alfresco had more reasons to reconsider an (embedded) BPM engine. There are customer considerations against limitations to the LGPL license (or the perception thereof) which is why the Activiti project is developed under the Apache 2 license.
JBPM is a ‘technically oriented’ BPM engine. The Activiti project’s vision is that it should be a lightweight engine, easy to use (for Java developers) and that ‘workflow’ could also be social. Remind the could be. The Activiti project does not prescribe how an organization should use BPM, but it wants to facilitate collaborating around the business process.
Traditionally, the development of (business) processes is the ‘analysts’ domain. This role develops process diagrams, defines the flow of jobs, defines to what role a job is assigned, and what automated steps take place. Next in line, the ‘developers’ create “executable code” of it. Activiti has a number of elements in it which can facilitate collaboration among the roles involved like analysts, managers and developers.
First, Activi utilizes BPNM2.0, the now widely accepted open standard for process modeling. The beauty of this 2.0 version of the standard is that next to the schema language, the underlying defining XML standardized as well. Activiti can directly execute this XML. This has the advantage that the analyst and the developer work on the same process scheme and therefore underlying XML. They can read each other’s work, and actually work on the same schema’s. That will do a lot for the effectiveness of communication. Activiti also provides an additional module where all roles involved are facilitated to collaborate in a ‘2.0’ style, and improve the process of developing business processes, and improve existing ‘running’ process definitions. I will elaborate on this later in this article.
For Alfresco the Activiti path is a well thought out decision. Two of the founding fathers of jBPM actually joined
Alfresco in order to achieve this open source BPM engine. Alfresco already had the experience of running an open source project because it is open source itself. Next to that they have run the Apache Foundation-route before when they created the OpenCMIS project, now included in the Apache Chemistry project. (Did I mention SpringSurf Alfresco developed and donated to SpringSource? Quite some open source activity here…)
For ease of explaining, let’s assume that in the development and operation of BPM processes the following four roles are involved:
- The analyst has understanding of the business domain and defines processes and tasks.
- The developer creates the executable code, to fill in the automated tasks and lookups as resulted from the analysts work.
- The process participant is any person in the organization that gets a task assigned in running business processes.
- The administrator is the role that ensures that the BPM system will operate. Tasks that ‘get stuck’ or processes that fail can be restarted, removed or reassigned. This role is understanding why processes function as they do in terms of errors, performance etc.
I will explain the modules of Activiti using the chart below.
The heart of the system is the Activiti Engine. This is the work horse where BPNM2.0 XML format is ‘imported’ and depending on the logic the described process steps are created and dispatched. This advanced engine has an extremely low overhead in terms of memory usage and database storage/manipulation. The engine generates jobs that can get assigned to individuals / groups / roles. There may also be “system tasks” defined that can do all kind of automated tasks. Think of document manipulations in a DMS (using CMIS?), communication with other systems using web services for example, changes in (external) databases, etc. Processes that are no longer active are moved to an archive, to improve on execution speed.
Activiti comes with many types of activities / tasks. Next to that a simple Java API exists that enables organizations to define their own tasks. If a basic set of functionality is implemented these tasks can be graphically modeled and the engine can execute. This way, the custom activity can be reused and configured by the analyst using the graphical user interface.
The Activiti Engine is as open as possible. Besides extensive access through the Java API, you can access a REST interface to query and control the application. This means that the applications which make use of the Activiti Engine not necessarily have to be programmed in Java. This allows presentation of the task list in applications build in languages like PHP or .NET. The Activiti Engine can be queried in many ways to generate work lists, metrics, ongoing processes etc. etc. Think of searching running processes, using the numerical value of an attribute is greater than x, sorted by start date.
Activiti is designed as an enterprise grade BPM engine, thus is also scalable. It is prepared to function in the cloud, instances of the engine can run in parallel if desired, and it integrates seamlessly into an existing application for example using the Spring framework.
The last feature I want to be mentioned is the ability to automate the testing process. There are facilities built to test using JUnit (version 3 and 4) to test the process. This is great news because it saves a lot of clicking to the many paths of a process to go through. This is a process facilitated by the engine deploy, run and undeploy the process definition. All steps can be executed, where automated tasks like sending email can be (temporarily) switched off. Using the JUnit results it can be determined whether the business logic in the process is working as intended.
The Activiti Explorer is the user interface for the process participants. Here the personal and group task lists can be found. Group tasks can be claimed, and tasks can be completed. This means that data in a form can be completed or process choices can be made. Tasks can be reassigned to other users, and ad-hoc tasks can be created and assigned to anyone on the spot. Similarly, a user can ad-hoc create sub-tasks to divide a task into a number of smaller assignments.
Activiti Modeler was developed by Signavio. The Modeler is a web application in which processes can be modeled using the BPMN2.0 schema. The process definitions are stored in BPMN2.0 XML format stored on the server. Like the SpringSurf framework the modeler communicates to the server via JSON. In the default configuration, the Activiti process definitions will be stored on the servers file system.
Activiti Designer is an Eclipse plugin. In this way, the developer can work on both the process XML and the graphical schema and the code in the same developer environment and easily switch between the related pieces of logic. Basically it does just exactly what you’d expect.
Activiti Probe provides an overview of running processes. This application is typically for administrator-like roles. Here you can monitor if the BPM engine is still functioning, how the resource usage is doing, and check up on the log files. Process instances can be deployed into the engine. If the process unexpectedly fails, running tasks can be restarted, reassigned, or the process be stopped or restarted.
At present Activiti Probe is “limited” to display system settings and relevant database tables. This is in my opinion already much better than the ‘web based command line tool’ that is currently shipped with Alfresco version of JBoss. However, it is not yet what one would expect of an Enterprise tool. A graphical tool with more management possibilities and more ways of finding running (or failed) processes, is in the pipeline.
Activiti Cycle is the module where the social, collaboration aspect is located. BPM traditionally is the domain of business analysts. On the other hand, the developers combine the flow with the (custom) logic, make it communicate with repositories and ‘make the process work’. Activiti Cycle is an environment focused on collaboration with the process in its center. Processes can have relations with “artifacts” such as (for example Visio, Office, CAD) files, Maven repositories, Jira issues, a source code repository (like SVN). All roles involved in the creation, and execution of a process can collaborate and discuss about the related processes and artifacts in context. There are many features that could be used, but the tool does not force off ‘how to do it. ” Depending on how an organization intends to deal with the process of mastering BPM, the tool can be used accordingly. Various benefits can be gained, like people are more involved, solutions become more realistic (i.e. successful), and the design / development process is documented properly and subsequently decisions can be traced back to how, when and why.
Integration into Alfresco
Integration of Activiti into other systems is the responsibility of the embedding system. Activiti is intended as a ‘generic’ BPM engine. Luckily Activiti and Alfresco share the same standards (including SpringSurf), making integration with Alfresco “relatively easy”. The integration team at Alfresco is mainly engaged in creating “activity types” (to automate manipulations of the repository), mapping Alfresco users to Activiti (and the effects on authorization in Alfresco), and integrating task-related user interface elements to the Alfresco (Share) frameworks ( think of the service forms to generate the task screens).
At the moment Aactiviti is a project heavily in development. The first release candidate is out just this afternoon (we count Version 5 RC1 at time of writing). According the roadmap, seven point-releases are scheduled from the start of 2010 up till July (5.1 – 5.7) , one each month. Although it is an indication in terms of planning, it is a tight schedule, but also a serious indication of the rapid pace of product development. At this point in time Activiti is not the enterprise grade, production ready competition to ‘commercial’ mature BPM solutions. As the pace of development continues, it could soon be suitable for “simple processes”, provided the required basic blocks are there. Personally I’m really excited for what the integration with Alfresco will bring… Take a look at the activiti.org web site for the Today’s current status, and keep an eye on the roadmap!
Screenshots are reused from the activiti.org web site
CMIS is the Content Management Interoperability Standard managed by OASIS.
OpenCMIS (is part of the Apache Chemistry project) is a Java implementation of the CMIS standard.
BPNM2.0 is a standard managed by the OMG (Object Management Group).
JBPM is the open source workflow engine of JBoss, so owned by RedHat.