Search code examples
timerworkflowactivitibpmn

Activiti - impact of enabling jobExecutorActivate


We need to enable the jobExecutorActivate, because we want to use timers in our production diagram.

The thing is that we have a huge diagram running on a production environment. We dont found any information in the activiti user guide refering to the impact of enabling the jobExecutorActivate.

We are using Activiti-5.22.0

So we ask the experts about it. What's the impact of enabling the jobExecutorActivate ? performance only ?


Solution

  • So as you probably know, the job executor is on by default and it has to be on if you want to use timers, presumably you've had it explicitly turned off up to now. Obviously there will be some performance hit by using timers, but if you have to use them then you've no choice but to turn the job executor on.

    If it's an option, upgrading to v6 of Activiti should give a performance increase, from the docs here:

    The async executor of Activiti 5 is the only available job executor in Activiti 6 as it is a more performant and more database friendly way of executing asynchronous jobs in the Activiti Engine. The old job executor of Activiti 5 is removed. More information can be found in the advanced section of the user guide.

    If you're stuck on v5 then you can still tweak the job executor, eg to wait until it has multiple jobs to process before it runs using the maxJobsPerAcquisition property. Obviously this will then be a toss up between fast process execution and load on the server so you'll need to test for your specific scenario or make a judgement based on the frequency and required responsiveness of your timers.

    You can of course also do other things to tune performance and load such as turning down history recording. There's a great series of blog posts about Activiti performance with some tweaking info available here, a bit old but still good.