How to obtain the user or possible users in charge of performing a task?

1
0
-1

How can I obtain the user or possible users in charge of performing the task called Step2 through a Groovy script? (See attached image)

Mi-Diagrama1-0.png

Comments

Submitted by Dibyajit.Roy on Sun, 03/28/2021 - 18:37

Hello

Please refer to this link

https://community.bonitasoft.com/node/35386#node-35391

Regards

1 answer

1
+1
-1
This one is the BEST answer!

I solved it in the following way:

List possibleUsers = apiAccessor.getProcessAPI().getPossibleUsersOfHumanTask(processDefinitionId, "Step2", 0, 10)
logger.warning("possibleUsers --> " + possibleUsers)
// I get the id of the first user in the list.
def userId = possibleUser[0].id

It should be noted that in the process I do not have any actor filter defined.

Notifications