K2Server.OpenWorklistItem() and K2Server.OpenWorklist()

  • 14 December 2009
  • 1 reply
  • 2 views

Badge +4

Hi All,


we are using custom Taskboard( Like K2workspace) to display all the tasks.


Scenario: Task1 is assigned to User1 and User2. if User1 takes the action then Task1 should disappers from Users2 taskborad. we configured all destination set accordingly. 


The above scenario is working fine in K2 workspace. but the same is not working in our custom  taskboard. we are Calling K2Server.OpenWorklist() method to display all the tasks in our custom Taskboard and K2Server.OpenWorklistItem(SerialNo) method to open particular task.  Openworklist() method is returning alreday action taken worklist Item also. But OpenworklistItem( SerialNo) method is throwing error " Worklist Item not found".


 The worklist Item is not there in k2workspace but OpenWorklist() method is returning the same. Why OpenWorklist() method is not returning refreshed value? Is there any way to fetch the same?


Thanks & regrads,


Nithya


1 reply

Badge +8

Keep in mind that when you use API to load tasks, it does exactly the same. It loads all the tasks for that user regardless of it's status.


You might need to add filter in your code to look for Available or Open tasks only, otherwise it displays Allocated as well.


When you click Allocated task, it will throw exception as it is already opened by some other user,.

Reply