Get groups users

1
0
-1

We are building a complex workflow that include collaboration between 12 departments.

When the process is initiated, we have 12 parallel tasks representing departments and each is assigned to a group to take action. In the connectors in, we are getting the list of users in this each group through the call below and send an email to notify the task users about the new task.

groupUsers = apiAccessor.identityAPI.getActiveUsersInGroup(group, 0, 100, USER_NAME_DESC)

This line of code is being executed 1 time per department (12 times in total) and we are getting the below exception

The element will be marked as failed. Exception is: org.bonitasoft.engine.lock.SLockTimeoutException: Unable to acquire lock 70004,PROCESS,1 in 60 seconds

How we can solve it. We need to get the groups users to notify them.

1 answer

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

Hi,

When executing a connector output operation, the runtime puts a lock on the process instance. In your case, as you are executing several connectors in parallel on the same process instance, you fall into a timeout exception on that lock.

To avoid this, instead of using a connector output to resolve the list of users, you can try to use a task variable default value expression to store the user ids list.

HTH
Romain

Comments

Submitted by habdulmalak_2529287 on Fri, 02/10/2023 - 07:27

<p>Retrieving list of users is moved to a task variable and it works perfectly.&nbsp;</p>

<p>I didn't know about the runtime locking the process instance when executing a connector. Thanks for this info</p>

Notifications