I have a process that requires an option to "return" a task and I'm struggling to solve this without custom code.
Let me paint a picture of the situation:
An accountant gets an invoice that is imported into the system. He checks it and forwards it to the employee responsible for approving the payment for this invoice.
Through escalations we can make sure that, if the task is not completed in 1 day, a reminder is sent. If the task is still open after 2 days, it goes back to the accountant.
Also, the employee has the option to open the form and choose "redirect" as a workflow action to send the invoice to a different user.
Now for the question:
The accountants need an option to get back an invoice. If they sent it to the wrong person or the person they sent it to is not available, they would need to either reassign it or to get it back to them. Waiting 2 days for the task to automatically return is not an option.
Here is what I thought of so far:
- I used a workflow-variable to set the escalation time. I then changed the variable from the accountant's side. Sadly, the escalation time does not change and the system sticks to the value the escalation had when it first started the activity.
- I tried to find a way to action the redirect outcome for the task - this fails due to the lack of permissions the accountant has on the employee's task. I could not find a way to do an impersonation without custom code.
- I had the task escalate back to the same user (through a value in the DB) every 5 minutes. The user could be changed in the DB and the next escalation would push the task to the new user. This offers new challenges, though. There are "gaps" in availability. If the taks gets escalated the link in the users tasklist expires and a refresh is required for the new link to be available. Also, the regular escalation after 2 days does not get a reset on the reassign.
Does anyone know of an option to do this?
Any input would be appreciated!
Best answer by ShawnFaucher
An untested suggestion, as we use the API via custom code to do these sorts of things, but there is a system smartobject (System>Management>Workflows>SmartObjects>Activity) which has the GoToActivity method. If this works like the API, you should be able to call this on a buttom press rule on the accountant's side, provide the Process Instance ID (the first part of the task Serial Number) and the activity name, and the workflow will expire the existing activity and start it again. If you also change your expiration variable first to make it immediately expire this should do what you want. You would probably have to give the accountant admin rights on that particular workflow.