Activiti 6 is here!

cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti 6 is here!

bassam_al-saror
Alfresco Employee
6 26 35K

Activiti 6 is here and it brings a number of significant updates to its core functionality.

The main highlights are:

  • Pluggable Persistence

Previously, the persistence logic was spread across different parts of the code. This made it hard to maintain and impossible to customise. Now, persistence logic has been centralised and a new set of DataManager interfaces (for low level CRUD operations) has been introduced, in addition to refactoring all entity classes and entity manager interfaces. This provides a high level of abstraction that easily enables customizing the persistence logic and swapping it with a totally different implementation. This enables the possibility for custom implementations to use different ORM libraries, multiple databases, NoSQL, or both relational and nonrelational databases concurrently and more!

  • No PVM, just BPMN

Activiti 5 uses a PVM (Process Virtual Machine) intermediate layer between the core engine and BPMN model. Activiti 6 core engine now directly works with the BPMN model.  All classes in the org.activiti.engine.impl.pvm package (and subpackages) have been removed since they are no longer needed. This results in reduced complexity and an increase in performance.  This also makes it possible to do things that were not previously possible in Activiti 5.

For example:

Running the process on Activiti 5 will result in a StackOverflowError. In Activiti 6 the process will run without any issues. Check it yourself by running this test available on github. The test class also contains other tests like the inclusive gateway and concurrency after a boundary event that were failing in Activiti 5 but are now working fine.

  • Support for dynamic processes & ad­-hoc sub processes

Consider a process definition designed to include a service task that communicates with an external system. After deploying and running some process instances some issues in the external system occurred and modifications were needed to that system. The modifications aren’t backward compatible, as a result, an updated service task implementation that’s aware of those changes is required. The process definition can be updated and redeployed but what happens to in-flight process instances? Isn’t there a way to fix them? It’s possible to update the process definition manually from the databases but that’s not a clean way to fix it. That’s where the DynamicBpmnService is very useful. DynamicBpmnService enables changing properties/attributes (i.e. changing task assignee, task priority, service task class, script task script, etc!) of a process definition without the need to redeploy. Some examples of using DynamicBpmnService can be found on github here.

Ad-hoc sub processes provides the possibility to dynamically add sequences of work on-the-fly. As part of dynamic support introduced in the engine ad-hoc sub process allows defining tasks without a predefined sequence order. The sequence order can be determined at runtime. There could also be some tasks that need to be executed in sequence order and other tasks that are left to runtime to determine their order. The following example shows two sets of tasks, one set (A task, Next Task, and Final Task) that should be executed in a pre-defined order.

The other set is can be determined at runtime. The following code shows how to get and execute those tasks.

Execution execution = runtimeService.createExecutionQuery().activityId("adhocSubProcess").singleResult();
assertNotNull(execution);

List<FlowNode> enabledActivities = runtimeService.getEnabledActivitiesFromAdhocSubProcess(execution.getId());
assertEquals(4, enabledActivities.size());

runtimeService.executeActivityInAdhocSubProcess(execution.getId(), enabledActivities.get(0).getId());
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

The DMN Engine and Designer allows you to create decision tables and get an outcome based on the input values and the rules defined in the decision table. These decision tables can be invoked from a decision rule task in a BPMN definition, but also independently of a process instance.

  • Form Designer & Engine

The Form Designer is a web-based visual environment to quickly design web forms without requiring special technical skills. It empowers business users to be part of the design phase. The Form Engine centralizes the form logic that was introduced with the new Form Designer. Forms can be deployed with BPMN process definitions but also deployed separately. Forms can be either referenced in a start event or a user task.

  • Activiti 6 App UI

The activiti-app is a new web-based environment composed of 3 Apps:  Kickstart App, Task App and Identity Management app.

  • The Kickstart App includes a BPMN 2 Editor to design process models, a Form Editor to visually design forms, a decision table editor to create DMN decision tables and an App Editor to create and publish process apps bundling all the models in one single package.
  • The Task App allows you to start new processes and tasks and access tasks assigned to you from any process apps.
  • The Identity Management app gives the admins the capability to create and manage users and groups. 

The Activiti 6 app UI home page.

Activiti 6 Task App showing the process list view.

Activiti 6 Identity management app showing the user list view.

  • Activiti 6 Admin App UI

The activiti-admin app is an administration console for administrators to monitor running tasks, process instances and jobs. Admins can perform various actions such as assign/claim/delegate tasks, terminate/delete process instances, update/add/delete variables, execute/delete jobs...

Activiti 6 Admin console showing a running instance detailed view.

  • Migration guide

Ready to move to Activiti 6? We have created a migration guide that outlines various aspects to consider and what is needed when migrating from Activiti v 5.x to Activiti version 6. Here the download page to get started with Activiti 6!

26 Comments