Hi All,
I have been working with K2 for a couple years now and I haven't been able to figure out a good way to get the Workflow Originator to have permsisions to redirect (or delegate) an approval task. I feel like I might be missing something simple because I think this would be a common request.
I have a simple approval workflow. The originator creates and submits a form, workflow starts and goes to an approval activity. I loop on this activity until there are no more approvers then the workflow completes.
I would like the originator of the workflow be able to redirect the task to another user if an approver is not available. (We don't want to rely on a K2 admin to redirect.)
My approval activity has the actions of Approve, Decline and Rework. If I create a "transfer" or redirect action on an activity it seems I would have to make the originator part of the destination set and then they would also get all of the approval emails that go out.
Is there another way to handle this? Can a destination user only have permissions to certain actions? Or should this be a separate activity and if so how would I stop the current task reassign the approver then start the task again?
Thanks for any help you can offer!
Janet
Hi Janet,
Unfortunatley security ONLY allows the destination user to redirect the task to another user (from the worklist / client API). The originator has no rights to any of the tasks if not part of the destination set. This is by design.
You will either have to add the Originator to the destination set or build a custom UI to impersonate the destination user (client API) and then if the logged in user is the originator, allow the redirect.
Alternatively, a process admin has this rights in Workspace and also via the Management API.
HTH!
Thinking about it... If you add an 'Admin' activity (with client event) in your workflow that runs from the 'Start' activity and assigns the task to the Originator, you can within this 'Admin' step change the datafield that sets the destination set and then perform a GotoActivity to the Approval activity which will replan the destination set.
NOTE: This will only work in a workflow where there is only a single activity active at any time since the GotoAvtivity will expire all other activities and continue at the designated activity on the GotoActivity.
Always keep the 'Admin' activity active by looping back to the activity using a line rule to itself.