Regarding Issue with SharePoint task deletion

  • 21 January 2009
  • 1 reply
  • 1 view

Badge +3

Hi All,


 


Our workflow is integrated with SharePoint.


 


We are creating tasks for many approvers simultaneously for an activity. Now for each user, there exists a task in both K2 and SharePoint.


 


When we complete the K2 task from the code behind of an aspx page, the K2 task gets completed but the SharePoint task still remains open.


 


Once the last approver acts on his/her task, K2 calls up some SharePoint cleanup and cleans the SharePoint tasks for all the approvers.


 


Our requirement is to complete/remove the SharePoint task also as soon as the approver takes the action on his task. (same way as it is happening in K2 worklist).


 


We have already spoken to K2 consultant on this but he told us that this is the limitation of K2 and suggested remove the task from the SharePoint manually.


 


If there is any code available for this, please share the same.


 


Many thanks in advance.


1 reply

Badge +2

In the code behind of your page, after you have actioned the K2 worklist item, you can simply use the SharePoint API to delete the task, or update the % complete nad status fields.


There are countless examples around on how to do this, but this should get you started:


http://msdn.microsoft.com/en-us/library/ms467435.aspx

Reply