we have a case in where an API receive a list of task to be redirected to another user, and it will iterate for each item and redirect the task to the user destination.
The problem is we have a preventive measure so that if any of the redirect fails during the loop (connection down, task not found, etc.) it will undo the task that have successfully redirected, back to the original owner of the task.
My Question is, Is it possible to undo the task that was redirected back to the original owner? if yes, how do i achieve this?
“Release a Task List item” can be used to undo “Redirect a Task List item” according to documents, but I have not tested it on my environment yet. Will you please try Redirect if you have not tested with it yet?
I hope at least one of the following will helps:
At the moment, I think you can redirect the item back to the original user through the management console in Workspace. for now there was feature logged(https://ideas.k2.com/) just that I'm struggling to trace it.
Additionally Kindly dive into this dev ref(https://help.k2.com/onlinehelp/K2Five/DevRef/5.3/default.htm#Runtime/WF-Manage/Delegation.html).
Take this time to Vote for related issue as shown(https://ideas.k2.com/ideas/APIT-I-880).
Please also look read in below:
I have found a workaround a long time ago for removing unwanted worklist items by simply redirecting the item to a person that already has the item. It does not start it twice and the old one goes away. This is via the K2 API.
How to delete or stop an activity from another in the same process?
Hope it helps
Thanks for the reply
This one works since it actually return the task to the original owner after redirect, however the GoToActivity method isn't executed from the management site. I also check the K2 REST API but it seems that i cannot found said method. Any available alternative beside using custom made API?
Please take a look at the following, if you have not yet, about - Sleeping, Waking, Redirecting, Allocating and Releasing tasks:
Workflow REST API: Task Operations: https://help.k2.com/onlinehelp/k2five/devref/5.3/default.htm#Runtime/WF-REST-API/Workflow-REST-API-T....
I have went out to gather all the information you may neeed
Task Name and Goto Activity in K2 Five
Workflow REST API Code Samples
Workflow REST Services: However this is our previous versions
How To: Expire Parallel Tasks Based on a Condition
Expire client event not the activity
How to end one of the parallel flow and keep other running on click of a button
I think you should also try lookind deeply into the GotoActivity as it has worked for most people.
All the best.
Yes, you can use the GoToActivity with API and the advantage is that you can specify the FromActivity in order to not stop all other activities but only one.
This API is already used by the custom very intersting service broker Workflow Management: https://community.k2.com/t5/K2-blackpearl/WorkflowManagement-Service/ba-p/65416