Thursday, 3 October 2013

Ending a Sharepoint Workflow on First Rejection:


I' m just going to come right out and say it: SharePoint's out the box approval process leaves a lot to be desired. There, let the chips fall wherever the hell they will.
They're not customisable, and the emails they send out to approvers and the person kicking off a workflow are vague and obscure at best, and completely meaningless to anyone not familiar with SharePoint.
Luckily, SharePoint designer provides a pretty user friendly interface creating workflows that can be customised to meet most of your requirements. For a primer on pimping a basic SharePoint workflow, it's pretty difficult to beat Bobby Chang's post on nothingbutsharepoint.com
All very good, the only problem I had after setting up my first workflow following Bobby's method, was that I wanted any person reviewing the item for approval to be able to reject it, and  for that to end the worflow, rather than requiring everyone to complete the workflow before its status moved from 'in progress' to 'rejected'.
To achieve this, add an action ahead of the approvals process (using the set 'workflow variable' option from the actions dropdown' list)  to set 'cancelonrejection' variable to 'yes', as in the screenshot below


No comments:

Post a Comment