Getting the user who completed the task

Hello,

I was wondering if there is any easy way of getting the id of the user who completed a User Task? Ideally inside the Complete Task listener, so I can save it as a processVariable for late use.

I was thinking on an scenario where I want to assign the following task to the user who completed the previous one. Of course, one option is sending that name as a process variable when completing the task, but I would preffer getting that from the authenticated user info that Camunda has, in a similar way I believe is done for getting the initiator of a process instance.

Cheers

Carlos

Could you get the task assignee value from the runtime task service? Or possibly from the history service. So it would be more like your second user task would have a listener that checks who was the assignee of the previous task and set a input variable for the second user task that would be the value of the assignee from the first task. Your assignee field in the second task would just be a expression that points to the input variable