Returning the owner of a task

Draft comment:
This topic is shared by BAW, CP4BA, CP4BASaaS. Last updated on 2025-03-13 12:15
You can know the identity of a user who has completed a given task.
You can do this by defining an output parameter for the human service to store the name of the user that completed the task.
Within the human service, before its termination, use the following code to declare the output parameter:
var user = tw.system.currentTask.assignedTo;

It returns a TWUser object.

The name property can be used to determine the userid of the user that claimed the task.