Friday, October 17, 2014

Activiti 5.16.4 released

We've released Activiti 5.16.4 and that includes bug fixes, but also 2 bigger features.

We've introduced a new lock free job executor that improves the scalability of the job execution with magnitudes. You can read more about the new job executor here https://github.com/Activiti/Activiti/wiki/Notes-on-the-new-Actviti-Jobexecutor-(Oct-2014).
Note that the default job executor is still the old job executor, so you need to explicitly enable it before it will be used. The new job executor only supports non-exclusive jobs right now. Exclusive job and suspended process instance support will be added in the next Activiti release.

Another change is the move from the Restlet framework to the Spring MVC framework for the REST services implementation. The REST API urls haven't changed though, so all REST clients should still be working ok. We did remove the deprecated legacy REST services though. Let us know if you run into issues due to this removal, but all data should be available through the other REST services. A benefit of moving to Spring MVC is the integration with Spring Security, so it's easier to configure authentication. Also, we'll be introducing an Activiti Spring boot module in the next Activiti release, which makes it easy to add Activiti to a Spring boot application. You can already see more info here http://www.jorambarrez.be/blog/2014/09/29/webinar-on-youtube/ .

You can get the new release via Maven central, the download page on the Activiti website, and our Activiti Github repository. Enjoy!

Friday, August 15, 2014

Activiti 5.16.1 released

Today we released Activiti 5.16.1. This is mainly a bug fix release for Activiti 5.16 and doesn't include any database changes other than the usual version update in the property table.

Although it's a bug fix release, we've added a nice new query capability for process instances and tasks, an OR statement. Now you can query for process instances and tasks using one chain of OR statements using our query API. It can be used like this:

runtimeService.createProcessInstanceQuery()
     .or().processDefinitionKey("test").processDefinitionName("Test").endOr().list();

But you can of course also mix with AND statements like:

taskService.createTaskQuery().taskNameLike('%Test%')
     .or().taskOwner('kermit').taskAssignee('kermit').endOr().list();

This will result in a query like:

WHERE task.name like '%Test%' AND (task.owner = 'kermit' OR task.assignee = 'kermit')

Current limitations of the or construct are:
  1. You can use only one chain of OR statements right now. So you can't use the or and endOr methods more than once.
  2. You can use a specific field only once in an OR statement, so you can't use processDefinitionId twice in an OR statement for example. Only the second value will be used in that case.

We welcome any feedback and suggestions on this new query API option. If we get positive feedback, it will be added to more query APIs for the next release. Enjoy!

Wednesday, July 23, 2014

Activiti 5.16 released

I'm happy to announce the immediate availability of Activiti 5.16. This release contains the following highlights:
  • Added Spring boot support and more Spring annotation support in general (thanks to Josh Long)
  • Refactoring of the job executor to simplify its logic and prevent possible long wait times.
  • Added new event log table that stores process engine events when wanted, by default this is switched off.
  • Introduced asynchronous parallel and inclusive gateways to prevent optimistic locking exceptions (http://bpmn20inaction.blogspot.nl/2014/07/activiti-516-feature-preview.html)
  • Introduction of Crystalball, which is an experimental new project that allows you to replay and simulate process instances (Thanks to Martin)
  • Upgraded to Spring 4.x and Restlet 2.2.x
  • Various fixes and improvements
Thanks to community members Martin Grofcik, Henry Yan and Lori Small for their contributions to the Activiti project in the last months. Enjoy the new release!

Wednesday, July 16, 2014

Activiti 5.16 feature preview - async parallel/inclusive gateways

This article will go into details about one of the new features of the upcoming Activiti 5.16 release, parallel behaviour. In 2012 I've written a blog post about this and still a lot of people refer to it in forum posts or emails. This blog post describes how to solve possible optimistic locking exceptions when working with parallel and inclusive gateways in Activiti, using Apache Camel.

It's not really elegant to force using another framework to solve a potential issue with process execution, even if it's a great framework like Apache Camel. That's why we've implemented an easier solution in Activiti, that will be part of version 5.16. Let's describe the potential issue shortly, before showing the new feature/solution.

When you have two long running tasks you want to run in parallel, Activiti provides asynchronous service tasks to make this possible. With the default synchronous service tasks, Activiti would wait until task 1 is completed and then execute task 2. By making the service tasks asynchronous both tasks can be executed in parallel. The optimistic locking issue will appear when task 1 and 2 are completed at almost the same time. Both tasks will enter the second parallel join gateway and will try to update the current execution. Only 1 task will be successful in performing this action and the second task will get a optimistic locking exception.

With Activiti 5.16 it will be possible to make the second parallel join gateway (and also an inclusive gateway if you're using that gateway type) asynchronous as well. When you define the parallel gateway as an asynchronous and exclusive gateway no optimistic locking exception will occur anymore.


<parallelGateway id="gateway2" activiti:async="true"       
    activiti:exclusive="true" />

So it's really simple now to deal with these kind of parallel behaviour issues and no Apache Camel route is needed anymore to solve it. 

More good stuff is coming in Activiti 5.16. We expect to release it next week.

Tuesday, July 8, 2014

Activiti Designer 5.15.0 released

Hi all,

We released a new version of the Activiti Designer Eclipse plugin (5.15.0). This release is a bug fix version and is available on the following URLs (as always):

http://www.activiti.org/designer/archived/activiti-designer-5.15.0.zip (archived site)
http://www.activiti.org/designer/update (update site)

Note that the 5.15.0 release includes improvements to data object support and usability in general. It also allows you to connect to the Alfresco Activiti Editor and download and upload models from and to the Editor cloud repository.

Hope you'll enjoy this new release.

Wednesday, June 18, 2014

Custom palette available in the Alfresco Activiti Editor

We are working hard to add more and more functionality to our Activiti Enterprise offering in addition to our ongoing efforts in the Activiti open source project. Today I'm happy to announce that we added a feature to the Alfresco Activiti Editor to customize the palette of elements with which you can model your process definitions. This feature is named stencils and is available to Enterprise account users directly.

You can add as many stencils you want and each stencil defines the elements you can model with in the palette you see on the left-hand side when modeling a process definition. Per element you can also define which attributes or properties should be made available to the model user. Let's look at an example of a stencil.


In this every simple example, we have reduced the number of BPMN elements quite a bit. Only a start event, some activities, gateways, connection objects and an end event are remaining. That's nice for some use cases, but it becomes a lot more useful when you can add your own elements as well. So let's a new element to our custom stencil.


In this example we are adding a Validate order element to our custom stencil and we can define if it needs to be generated as a Java service task, an expression or a delegate expression. In this example we define it as a Java service task that executes the org.activiti.task.ValidateOrderTask class. In addition to the name, description and group you can also choose an icon for the custom element (which is shown in the palette and the canvas element) and choose a color for the canvas element. So in addition to the common BPMN elements, we now have a custom element Validate order that we can use in a process definition.

In addition to the basic element definition it's also possible to add custom attributes or properties to an element as well. For each attribute you can choose if it needs to be generated as part of the BPMN XML as a field extension or if it's just meta data that doesn't need to be in the BPMN XML. Let's add a validation identifier property so the validate order task can be instructed to use a specific validation method.


You can define the name, id, description and property type when creating a new property. When you want to include the property in the BPMN XML as a field extension as well, you can define the field extension name as well.

When you are ready with the stencil definition it can be saved and you start creating process definitions directly with this new stencil. In the create process popup you will get an additional dropdown where you can choose the stencil you want to model with. This can be default BPMN, but also a stencil from the stencil editor.


It will come as no surprise that the process editor will now show the palette according to the newly defined stencil. And when adding the validate order element to the canvas you'll see it uses the icon and the element color we've chosen in the stencil editor.


This opens up a lot of possibilities to make process modeling easier for model users. And it's directly integrated in the BPMN XML generation and can be deployed on the Activiti Engine. Stencils can be shared across model users in an easy way and versioning is applied automatically. When needed, you can go back to an earlier version of your stencil by choosing the specific version from the stencil history.

We'll be interested to get any feedback on this new feature. If you want to experiment with this new feature let me know and we can get in contact to upgrade your trial account to an enterprise account.

Tuesday, May 13, 2014

Alfresco Activiti Enterprise offering

We are very happy to announce the availability of the Alfresco Activiti Enterprise offering. This means that a fully supported version of Activiti is available starting today. The package includes the Activiti Engine and REST web application of course, but also includes a fully new Administration application and a web-based modeling tool.

Let's start with the web-based modeling tool. You can browse to https://activiti.alfresco.com and create a trial account there. When you login to the modeling tool you'll get an overview of your model repository (which is empty at first of course).

In the repository view, you can easily browse your models, search for specific ones, and look at models you shared with others or others shared with you. It's also possible to import an existing BPMN XML definition into the repository if you have an enterprise account.

From the repository view you can directly go into the editor and start with BPMN modeling.


The editor provides a palette of BPMN elements on the left side, the property view at the bottom, the toolbar at the top and the canvas in the middle of the screen. When you click on one of the BPMN elements you'll get a quick edit menu to be able to add new BPMN elements in a convenient way and to transform or delete the selected BPMN element.

Another nice feature of the Activiti Editor is the availability of validation of the process definition via the second button from the left in the toolbar, the "V" button.


The BPMN elements that have validation errors are highlighted in red and the validation errors can be viewed by clicking on the error icon at the top of the BPMN element. This opens a popup showing the validation messages.

In this case the user task doesn't have any assignment defined yet.

The Activiti Editor provides a lightweight and easy to use BPMN modeler and you can get started with this tool by signing up on the https://activiti.alfresco.com website.

The other new component in the package is the Activiti Admin application. A trial can be requested by filling in this form https://www.alfresco.com/products/activiti/trial. The Admin application provides functionality to browse through the Activiti Engine and query for specific process definitions, instances, tasks and jobs. For each entity a clear overview is provided including process variables, historic information etc.



In addition to the query and entity management capabilities, the Admin application provides an easy to use cluster configuration. For failover and performance reasons, it's often better to have at least 2 Activiti Engine instances on the same database. The Admin application makes it really easy to setup such a cluster of 2 or more Activiti Engines. When a cluster is running the Admin application provides Engine information, like number of process instances executed and the number of jobs in the queue, in addition to JVM information.


To be clear, this Enterprise offering will not change anything for the Activiti open source project. the Activiti Engine will remain fully open source. This new Enterprise offering will provide additional tools and applications around the Activiti Engine and it will provide a supported version for companies that are looking for support.

For more information about the Enterprise offering you can look at this web page http://www.alfresco.com/products/activiti