Open Worklist from another managed user

  • 19 September 2008
  • 4 replies
  • 1 view

Badge +8

hi,
I have two user.
1. domainuser1
2. domainuser1Manager

In active directory domainuser1Manager is the manager from domainuser1. Now I am logged in as domainuser1Manager and I want to open the worklist from domainuser1 using the api.


Worklist wl = conn.openWorklist("ASP", "domainuser1")


but I get the following error:
Message             "24412 K2:domainuser1Manager from ? is not allowed to open this worklist"


I have also tried to get the managed users (when I am logged in as manager - domainuser1Manager)
Connection conn = new Connection();
conn.Open(k2_host, ConnString(5252));
SourceCode.Workflow.Client.User manager = conn.User;
SourceCode.Workflow.Client.UserList userList = manager.ManagedUsers;


But the userList, where all the managed users should be listed is empty.

Any ideas?
Thax





 


4 replies

Badge +1

I also got the same problem. Here is what i did to overcome that error...


1. I logged on as a manager, reterived the list of managed users using enumeration.
2. Iterated through the users, Impersonate them and fetched thier worklist items.


This could be a workaround, but not sure why i got the same error you also got.


HTH.

Badge +8

Thank you for the information. This solved our problem!


PS: please excuse my late answer


Jochen

Badge +1

I have a similar requirement where a manager wants to see an aggregation of all tasks for the users that they manage.  Is there some way to specify multiple users when calling the OpenWorkList() method?  So far I have tried the following


conn.openWorklist("ASP", "K2:domainuser1,K2:domainuser2")


conn.openWorklist("ASP", "K2:domainuser1,domainuser2")


conn.openWorklist("ASP", "K2:domain*")


 


and I get the error stated above.

Badge +9
I don't believe you can fetch multiple user's worklists in a single call.

Reply