04-11-2017 02:36 AM
I am trying to get the names of the reviewers who approved a review task so I can display along the with the task data. On the complete event of the task I would like to record the approver's name so I can have the workflow send an email to the initiator with the list of who approved and who rejected.
On the "Complete Event" with the task, I am trying to use task.actorId but this is returning a null. I have been searching the forum for similar scenario and found https://community.alfresco.com/thread/195673-ottenere-lo-username-dellutente-che-esegue-un-task-di-u....
I am very new to Alfresco, so if there is a tutorial that I should read, please direct me there. I am trying to understand what is available to me to use. Thanks.
04-11-2017 06:38 AM
Use task.getAssignee() rather than actorId().
This will give you the id of the user who acted on (and claimed if using candidates) the task.
If you have multiple approvers, then use a map to store the id and identity object so you have all approvers in a single object.
Greg
04-11-2017 05:17 AM
I'm new to Activiti as well
If the approval steps are not parallel and if you got a form for each step you could write the current user (that would be become the approver) to a form field using JavaScript. Having it in a form field it should be available for further usage throughout the process.
Javascript sample (first three rows):
04-11-2017 06:38 AM
Explore our Alfresco products with the links below. Use labels to filter content by product module.