Task Actor

1
0
-1

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?

2 answers

1
0
-1
This one is the BEST answer!

Hi.

You need to add an Operation with a groovy script :

return BonitaUsers.getProcessInstanceInitiator(apiAccessor, processInstanceId).getFirstName();

Comments

Submitted by ale.ghirardi on Fri, 06/27/2014 - 14:19

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

Submitted by yannick.lombardi on Fri, 06/27/2014 - 14:43

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.

1
0
-1

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.

Notifications