Skip to main content

Hi All,


Please help me, In a workflow Document admin selects users from Aspx page and assigns the review tasks to the users, These users are assigned as destinations to the client activity. We have a Task updation page for updating user tasks, Users are able to update their tasks.


But we have a requirement where the document admin should be able to open the task of the assigned user in some cases (user is not available or leave....etc) and cancel the user task.


Please suggest me how to achieve this functionality in K2.net 2003 and K2ROM.



I appreciate your help...Please do provide a code snippet if possible


Thanks,


SP

Normally, you would not cancel a tasks because the user is not around.  e.g. A user applies for leave and is waiting for a manager to approve.  If you cancel the approval task, the user would still be waiting to see if his requests was approved or not.


From your description, it looks like you are looking for the Out-Of-Office feature.  If the user is on leave, he could set his Out-of-Office status to on and set his delegate. This would cause his workitems to be moved to his delegate's worklist.


 The other way of course would be to use the k2.net service manager to redirect the workitems to somebody else to work on.


Note: the Out-of-Office component for K2.net 2003 is a separate download from the customer portal site.  This is available from SP2a and above.


It is a review task not a approval task assigned to the user. We need the doc admin (originator) should be able to cancel the task of the user.


Please shed some light on Out-Of-Office component for K2.Net 2003 .. we are using K2.Net 2003 SP4.


 Thanks,


SP


Thats a slightly different scenario if you are letting the originator cancel the requests (regardless of where the process approval is).


Here are some ideas that might (or might not) work:



  1. Create a parallel task with the originator as the destination.  If this tasks is executed, it will execute a GotoActivity in a subsequent server event and expire all other activity branches in the process.  This effectively cancels the whole request.
  2. Create a web service that runs in a app pool account that has admin permissions on the process.  You could write an admin page which then allows you to cancel the process based on the process instance ID (or folio if it is unique).  In the web service, you can execute K2MNG API functions to do a GotoActivity to cancel the process.  This approach requires you to keep track of the active instances and also requires you to control the rights to cancel from your own application.

As for the Out-of-Office functionality, I guess the best place to learn about it would be to download the binaries/documentation.  Read the doumentation and try out the binaries in a test environment.


Hi Johnny,


 Thank you very much for the quick response and the ideas. We are working on  your approach and will update soon.


Thanks,


SP


Reply