OOF Feature -- OpenWorklistItem not working for delegated tasks

  • 2 March 2016
  • 1 reply
  • 2 views

Badge

Dear All, 

 

I am trying to utilize the OOF feature of K2.

 

Basically I am using the worklist webpart to show list of tasks assigned to a user . When the user clicks on any one of his task aspx form opens up. The following code snippet is used to open the current worklist item by using the Serial Number -- sn from query string 

 

connection.Open(_k2ServerName);
connection.ImpersonateUser(Context.User.Identity.Name);
workListItem = connection.OpenWorklistItem(Convert.ToString(Request.QueryString["sn"]));

 

When I am setting OOF of user1 to user2, all tasks of user1 appear in worklist webpart for user2 as well. However these tasks are flagged yellow (delegated). BUt for user2 the following statement throws an error that user2 doesnt have rights to access this worklist item

connection.OpenWorklistItem(Convert.ToString(Request.QueryString["sn"]));

 

There are other overloads of OpenWorklist, but I was unable to find sample code snippets. If any one can help in this regard I would really appreciate it

 

Thanks in advance

 


Reply