Is information about which user that actually completed a user task logged to the Activiti tables? If so, is it available using the API? I've looked both in the documentation and in the database tables, but I haven't managed to find it.
The assignee isn't necessarily the actual performer.
If i'm not wrong, you have to use <code>historyService.createHistoricTaskInstanceQuery().finished().list()</code>. It's a query class so you can add filters like <code>taskAssignee</code> (user id), etc.
There is no logging of the user who actually completed the task. If you want to make sure the assignee is always the person completing the task, you can:
Add "setAssignee()" before completing the task, based on the logged in user, to the service-layer you control that is calling the Activiti API.
Add a task-listener to the task (or to all tasks, using a BPMNParseHandler) that is triggered on the "complete" event of the task. In this listener, you can either throw an exception (not completing the task if logged in user in not the assignee) or set the assignee on the passed in DelegateTask (will be recorded in history)