This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
Open worklist item operation is very slow (takes more than two minutes) for specific user(s) when performed via the following API call:
WorklistItem workItem = wkfConn.OpenWorklistItem(serialNumber, "ASP", false);
It is also possible to see that for affected users, execution of the UMGroup Get Groups SmartObject takes very long. The same can be observed if you run GetIdentityContainers table-valued function in the K2 database, i.e. execute:
SELECT * FROM [Identity].GetIdentityContainers(%USER_ID%,1)
This issue can be caused by the affected user being a member of a large number of nested groups/circular nested groups. The issue can be reproduced if you create 10 groups, and then add the 1st one in all of them and adding your test user to all of those groups. This causes extreme slowness of the GetIdentityContainers function.
To resolve this issue, apply the K2 update which includes optimizations for the GetIdentityContainers function: