Here you find an example that shows how to get initial value for assigned user to the user task. However when yo reassign the task this will not have updated information, since you rely on work item information and reassignment happens on task server.
Alternative approach is to define user that really completed the task as task variable so it can be mapped on process instance side again. That in fact would nice if the task server makes it accessible out of the box under a specified key inside result map that is sent over to process engine.
It doesn't look like this works in my case.
I need owner not actor id. I my situation, I only identify a group id then some member of that group claims the task. I want to know which group member claimed it. I am guessing that, with an exit action or script node, there is no way to access the task (which would allow me to identify the owner). Here is my on exit action which didn't work (owner is null):
String owner = (String) ((WorkItemNodeInstance)kcontext.getNodeInstance()).getWorkItem().getParameter("ActorId");
System.out.println("Owner is: " + owner);
However I think I can handle this OK on the application side i.e. the task owner will identify theirself to the process instance.
Did you manage to obtain the Owner from exit action?
Unfortunately i can't handle it from the application side