Hello, I need to save in a variable the actor who performed the task. As I can do it in version 6.3.1 Bonita Community?
Hi.
You need to add an Operation with a groovy script :
return BonitaUsers.getProcessInstanceInitiator(apiAccessor, processInstanceId).getFirstName();
Hi,
Yannick gives you the solution but you can’t collect the email of the person who performs the task with this command. I recommend you to use it in this case:
return BonitaUsers.getUserProfessionalContactInfo(apiAccessor, taskAssigneeId).getEmail();
Perhaps you can use it for more information.
Thanks, but this code only saves the user initiating the process. I need to store for each user task that can be performed or not the initiator
I know that you can get the user that is assigned to a task :
return BonitaUsers.getUser(apiAccessor, taskAssigneeId).getFirstName();
I try this in a process andit works, you need to add the returned user to a list on each task.