03-16-2018 11:14 AM
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!
03-16-2018 03:46 PM
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.
03-16-2018 03:46 PM
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.
03-19-2018 02:09 AM
Thank you! That was it...I didn't notice the owner property before.
Explore our Alfresco products with the links below. Use labels to filter content by product module.