This is my first post 😍 and about OOB workflow issue !! Lets see whats the issue & how we fixed it
Issue Description: We have migrated our MOSS sites to SharePoint 2013 sites recently and post migration check was success full from business end. But this verification missed to run the OOB approval 2010 workflow which was added to a library(other sites & other Workflows are running as expected).
When we run the Approval workflow on any of the documents from that library, it got cancelled with this message "The workflow could not update the item, possibly because one or more columns for the item require a different type of information". Also, approver added to the TO field didn't receive any emails regarding this workflow.
Steps we tried without luck:
1. Created new library and added Approval 2010 workflow, to reproduce this issue. Plan is to recreate the Approval Workflow if it worked in new library. I could reproduce the same issue with the new library too.
2. De-activated Workflow feature from the site collection and activated it.
3. Now when i created new library with same settings and an approval workflow, it works like a charm.
My library settings are here:
Version Enabled, Content types Enabled and Content Approval Enabled.
My Workflow Settings:
Start Options: Manual and to approve publishing a major version of an item.
Enabled Options in Next Page: Expand Groups , End on Document Change , Enable Content Approval
4. So i deleted the workflow which i created in Step 1 and added new workflow, that works with new library.
5. Tried the same with the reported library and this time it was not positive. End up with same issue. 😣
6. Deleted all the Approval Workflows added to that library and tried with new approval workflow. Got to face same issue.
Clearly we got to know that workflow associated with that library got corrupted.
From the ULS log:
12/20/2016 14:39:09.86 w3wp.exe (Servername:0x28E8) 0x3444 SharePoint Foundation Legacy Workflow Infrastructure 72er Medium System.UnauthorizedAccessException: Attempted to perform an unauthorized operation. at Microsoft.SharePoint.Workflow.SPWinOEWSSService.UpdateModerationStatus(Guid id, Guid listId, SPItemKey itemKey, SPModerationStatusType newModerationStatus, String comments) 2602c39d-a804-107d-3186-931a0a42b767
Steps to Fix the issue:
1. De-activate the Workflow Feature from the site collection
2. Run the below Script:
$sitecollection = get-spsite SiteCollectionURL
$web=$sitecollection.RootWeb
$folder = $web.RootFolder
$catalogs = $folder.SubFolders["_catalogs"]
$wfpub = $catalogs.SubFolders["wfpub"]
$subs = $wfpub.subfolders → this will list the folders under the Workflow pub folder. You will see Approval 2010, Publishing , collect feedback and signature Workflow templates here
Run below delete command alone with above script to delete affceted template:
$wfpub.SubFolders.Delete('Collect Feedback - SharePoint 2010')
$wfpub.SubFolders.Delete('Approval - SharePoint 2010')
$wfpub.SubFolders.Delete('Collect Signatures - SharePoint 2010')
3. After deleting the Workflow templates, activate Workflow feature from the Site Collection
enable-spfeature -url URL -identity workflows
This fixed the issue on that affected library and able to run new workflow without any issue.
Awesome
ReplyDelete