Process wide listener for every end/start event of a user task

Skip to first unread message

Mar 9, 2016, 8:37:02 AM3/9/16
to camunda BPM users
Hey everyone,

I've integrated camunda in one of our a backend applications some months ago and like it a lot.
But now we need to copy the assignee of a user task to all following user tasks in our processes.

A possible solution for that would be to store the assignee in a variable and use it in new user tasks via task listeners.
(That still can lead to problems when finishing tasks concurrently, but that is acceptable in this case)

But then I would have to add task listeners to all user tasks in our processes or to add the listeners to every user task programmatically before deploying the processes.

Are there any better solutions?

Ingo Richtsmeier

Mar 9, 2016, 8:56:13 AM3/9/16
to camunda BPM users,
Hello Andreas,

two possible solutions: You can use an expression for the assignee in the user task: ${userIdVariable}

You can register the task listener in the process engine by a plugin (see: for an example) The listener is now available for all user tasks from all process definitions. If you want to restrict the listeners to certain tasks, you have to check the actual task in the listener (and maybe do nothing).

Hope this helps,


Mar 9, 2016, 9:39:06 AM3/9/16
to camunda BPM users,
Hi Ingo,

thank you very much for your response!

I dont's like the first solution (task listener) that much because we'd have to add the scripts to every task in a process.

If nobody has another solution to solve this easier without adding listeners programmatically I'll do it like that.

Thanks for the plugin hint!

Philipp Ossler

Mar 9, 2016, 9:45:25 AM3/9/16
to camunda BPM users,
Hi Andreas,

by the way, you may be interested in the Reactor community extension [1].


Reply all
Reply to author
0 new messages