Capture "change assignee" event?


I’d like to send an email when a task is assigned to a user from the task view. Does this action emit an event that I can capture to run some JS code?


@felipRR you can do it by configuring TaskListeners to that activity in event type=“assignment”.

Refer the docs for accessing or loading script-source.

Note: You can use load('classpath:javascriptFile.js') for Script Type=“externalresource” which will load the .js files from your lib folder/classpath


Thanks for your suggestion, I’ll give it a try right now. I see that it accepts Java classes, so I’ll use it instead of JS to take advantage of its large API.

BTW, do you know if it’s possible to avoid changing the assignee in certain tasks?


By default, camunda allows reassignment behavior for all user tasks. If you want to block reassignment of user tasks, you have to query using task api for that task whether task is assigned to any user or not, if assigned then ignore the reassignment.