We’d like to limit the number of instances that can perform an activity concurrently.
We need a limit at activity- or task-level so we don’t overload an interface. We’ve already set a global limit for the thread pool and we’d prefer not to lower it for the sake of one or two tasks.
After some research it doesn’t seem possible “off-the-shelf”.
(Like a maximum instances variable for an activity that is queried during job acquisition and compared to how many jobs of that activity are already locked or something like that.)
Similar questions have been asked before:
(Stackoverflow May 2018) How to limit task executions in Camunda (without external synchronization)
(Camunda Forum 2017) Limit number of concurrently running processes
(Camunda Forum 2016) Limit number of concurrently running instances of a process definition: /limit-number-of-concurrently-running-instances-of-a-process-definition/2002
(Google Groups 2015) Throttling some processes/activities executions: /forum/#!topic/camunda-bpm-dev/5Qe9lNN8UAc
(Google Groups 2014) Limit number of concurrently running processes: /forum/#!topic/camunda-bpm-users/I_w15c0Vg64
(I’m only allowed to post two links, which is why there are only links for the two newest.)
The general consensus seems to be to either limit on another layer or to include extra steps in the process; neither of which would be an ideal solution for us.