This may be overkill for your particular situation, but yes - such a thing you are looking for is possible if you use the K2 API. We've created Web Services that consume the K2 API to take exactly the action you are trying to accomplish... does your solution currently integrate with any web services or custom code in some other fashion? If so, I can show you how to code this. If not, then we have to look if any of the out of box services or SmartObjects can be called to reasign a task administratively. I haven't tried that yet but would be willing to have a look and see if it is possible without custom code.
Thanks for the quick reply. Yes the solution is connecting to web services so I would be open to your api suggestion as well as one that doesn’t have any custom code.
How do you suggest we proceed? Through here? Via email?
If you are already calling a custom web service, then make a new function in there that references the sourcecode.workflow.management and SourceCode.Workflow.Client DLLs (you might also need the SourceCode.HostClientAPI.dll). Take some time to explore the functions available in these APIs - I think you'll want to use Management to get a particular task, and Client to impersonate a user, open that task and act on it or redirect it.
Thanks. Do you have the code already for this that you could share?
Do you know the user that the task is currently assigned to? If so, you can use the SourceCode.Workflow.Client namespace like so (this assumes your web service is running under the context of the K2 service account):
using (var cnn = new Connection())
{
// Connect to K2
cnn.Open(_k2Config.K2ServerName);
cnn.ImpersonateUser(currentTaskUserName);
worklistItem = cnn.OpenWorklistItem(serialNumber, "ASP", false);
worklistItem.Redirect(serviceAccount);
cnn.RevertUser();
worklistItem.Actionso0].Execute();