Task Listener Chaining

Hello!
I’ve been figuring out whether to use a Task Listener or Delegate Expression for assigning a task to a user, and Task Listener seems to be a better solution. Now I wonder, if I set up a Task Listener for create event, then need to add a couple of more to same task, how is that gonna impact the performance? And do the listeners get triggered in the order they were defined, or any other order?

Hi @vsmirnova,

Unless you do expensive things in the listeners (e.g. heavy IO), the performance impact should be negligible. In general, Camunda BPM’s performance is mostly determined by database access. Some extra method calls won’t be a problem.

In terms of API gurantees, I think the order is arbitrary. If you want to make sure that your listeners are invoked in a certain order, I recommend implementing a composite. It may be that the process engine invokes them in order of declaration anyway.

Cheers,
Thorben

1 Like