Skip to main content


 

Symptoms


When attempting to return the 'ManagedUsers' collection, it is empty for a Manager account:

SourceCode.Workflow.Client.Connection conn = new SourceCode.Workflow.Client.Connection()
conn.Open("K2SERVER")
var users = conn.User.ManagedUsers
 

Diagnoses


N/A
 

Resolution

To access managed users, you will need to enable this feature via K2 Workspace. Please see the documentation below:
http://help.k2.com/onlinehelp/k2blackpearl/userguide/4.6.11/webframe.html#reference_-_workspace_-_managed_users.html

When the current user's context is the manager, and you wish to open the worklist for his/her's ManagedUsers the following overload of the openWorklist method can be called:

openworklist("", ManagedUser)

Currently there is not a method/overload to return the worklist for the current user and/or the ManagedUsers in a single object instance. As such, one implementation would be to create a data structure for aggregating the WorklistItem for the current and ManagedUsers if deemed applicable. Perhaps iterating through the UserList of ManagedUsers and calling the openworklist("", ManagedUser) method for each ManagedUser.

Or perhaps implementing ManagedUsers similarly to K2 Workspace, in which the worklist for the ManagedUser will display only when clicking on that ManagedUser.




 
Be the first to reply!

Reply