I have task list that will contain a completion date per item. A workflow will be manually ran against any of these items which will result in around 350 + individual tasks being created for end users so the tasks could potentially stack up fairly rapidly.
I am hoping to create a new workflow that will complete the workflow task if for example it has been 5 days over the original item completion date. If there is also a way to summarize which users were auto completed (instead of individual alerts) then that would also be useful in terms of reporting.
Solved! Go to Solution.
You can create a site workflow that would query this list and look for any tasks where the due date is less than or equal to the current date minus 5 days. You'd need to calculate that value before the query and store it in a variable. Store the ID's of the matching tasks in a collection variable.
Then use a For Each to run through each of the tasks and complete the item. Then use a query list again on that specific task to retrieve any of the data about the task you want. You can use a Build String action to put all the data together and store it in a text variable. If you put the variable you will store the results of the Build String, into the Build String Text box before any other variables, then as the workflow loops it will append the data to the variable each time.
After the For Each finishes you can drop that text variable into a Send Notification, and send it to yourself to get a summary of which tasks were autocompleted.
If you wanted to have something on the tasks themselves that identified if they were autocompleted, then you could create a new field called "Autocomplete", make it a yes/no field. Then as part of your completion workflow, you would update that to "Yes". Then you can go and query on which tasks were autocompleted.
I'd use the 'Escalation' settings on a Flexi Task to perform this action.
Here is a screen shot
That way you can specify that if a user doesn't get to the task in 5 days, then task is autocompleted. You can choose the outcome for the task to I suggest you add an extra outcome that says 'Autocompleted' and have an update item action on the branch to set a status.
You can then use the query list action in a scheduled workflow to find out how many tasks are autocompleted over how many have been completed by the user.
Hope that helps?