Hello!
So here is my dilemma. I would like to get the information as seen in the screenshot from the workflow-details page using the Java API for every workflow associated with a document (NodeRef).
I am especially interested in the "Completed By", "Date Completed" and the "Comment" columns.
Here is what I have done so far:
- got the associated workflows using workflowService.getWorkflowsForContent(NodeRef, boolean)
- got the tasks for each workflow using workflowService.queryTasks(WorkflowTaskQuery, boolean)
- extracted properties for each task with WorkflowTask.getProperties()
At this point I have access to the "completionDate" and "comment"(if available) properties for each task. The problem is with the "Completed by" information. I thought the "assignee" property is what I need but they don't match. For the example in the screenshot the first task (in chronological order) has an assignee of "test1", the second task has an assignee of "null" and the third task has also "test1" and they should be "admin", "test1", "admin" respectively.
Can anyone tell me how to get the "Completed By" info?
Any help would be greatly appreciated!
Solved! Go to Solution.
The assignee does not matter - this property is only used for the initial assignment based on user input. You are looking for the owner of the task. The owner property is used to sync the state of the internal Activiti engine assignment, and will be the user who completed the task.
The assignee does not matter - this property is only used for the initial assignment based on user input. You are looking for the owner of the task. The owner property is used to sync the state of the internal Activiti engine assignment, and will be the user who completed the task.
Thank you! That was it...I didn't notice the owner property before.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.