Article ID: 2551474 - View products that this article applies to.
Consider the following scenario:
- You have a SharePoint document library where you have enabled Versioning
- You have also created a standard workflow of type "Approval - SharePoint 2010"
- On a regular basis, documents automatically go through the approval workflow to become available to end users.
- However, in exceptional situations (e.g. the appointed approvers are out-of-office and the content of the document expires or there is a deadline for the approval of the document), you need to override the workflow which is "In Progress" and manually approve a document so that it instantly becomes available to end users.
If you don't use the specific settings described in the procedure below, you will run into a behavior which is not very intuitive: when manually overrriding the approval workflow, the document will first appear as "Approved"; however, after a refresh of the page, the document will appear as "Rejected".
A SharePoint document library can have several workflows associated. However, there can be only one "Default Content Approval Workflow" which can be set by selecting the option "Start this workflow to approve publishing a major version of an item". If this option is not selected, you will not be able to cancel (i.e. override) an approval workflow. This option is only available on document libraries which have the option “Create major and minor (draft)” selected. According to this MSDN article
(http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splist.enableminorversions.aspx), this option is not available on lists.
A "Default Content Approval Workflow" is necessary when wanting to manually override an Approval workflow which has the "Automatically reject the document if it is changed before the workflow is completed." set to "Yes". Otherwise, when trying to manually override you will first see the document as "Approved"; however, after a simple page refresh, the Approval Status will become "Rejected".
This is the detailed configuration of the document library that you need to set up:
1. Go to Document Library Settings > Versioning Settings > set the following options:
- Require content approval for submitted items? = Yes.
- Create a version each time you edit a file in this document library? = “Create major and minor (draft)” (it is very important that you use this value; the other option will result in a completely different behavior and will prevent you from successfully overriding the workflow from the first attempt)
2. Go to Document Library Settings > Workflow Settings > in the Add a Workflow page, select the following options and leave other options with their default values:
- Select a workflow template = Approval – SharePoint 2010
- Type a unique name for this workflow = MyApproval
- Allow this workflow to be manually started by an authenticated user with Edit Item permissions = Yes
- Start this workflow to approve publishing a major version of an item. = Yes (it is very important that you enable this value, otherwise you will get in a completely different behavior which will prevent you from successfully overriding the workflow from the first attempt)
Click the Next button to access more options.
- Assign To = Select a group or user that will be appointed as default approver (users will be able to modify this when starting the workflow)
- Automatically reject the document if it is rejected by any participant. = Yes
- Automatically reject the document if it is changed before the workflow is completed. = Yes
- Update the approval status after the workflow is completed (use this workflow to control content approval). = Yes
After setting up the library, here is how you can use the manual override of the approval workflow:
1. Upload a file to the library.
At this point the new document will have "Approval Status" = "Draft" and "MyApproval" empty.
2. From the document’s dropdown menu, click Workflows.
3. Start the MyApproval workflow
The document has "Approval Status" = "Pending" and "MyApproval" = "In Progress"
4. From the document’s dropdown menu, click Approve/Reject then select the Approved option. Click OK.
5. We will get a pop-up window stating "A content approval workflow is currently running to approve this item. If you continue this action, you will cancel the workflow." Click OK to confirm.
Final result: The document has "Approval Status" = "Approved" and "MyApproval" = "Canceled"
(http://go.microsoft.com/fwlink/?LinkId=151500)for other considerations.
Contact us for more help
Connect with Answer Desk for expert help.