Forum Discussion
Andre Picard
Apr 18, 2018Copper Contributor
Workflow problem after restoring a site collection
Hello, I deleted an entire site collection (by mistake) and restored it with the "Restore-SPSite" powershell command and everything is fine except for my WorkFlows, they don't work anymore. At some point I was not able to publish workflows anymore but I fixed it but they are still not running. I got the following error in ULS logs:
"Microsoft.Workflow.Client.InvalidRequestException: The scope '/SharePoint/default/8e502628-b289-4613-bf9e-3c70847a4824/4c2b9a9b-1a07-4360-853f-7dea48785ca8' has no workflows under it"
Any help would be appreciated
PS: The workflows are running fine in my other site collection that why I didn't try to reinstall the workflow engine yet.
- Eduardo ScriccoBrass Contributor
Try the following command:
Register-SPWorkflowService –SPSite "https://siteurl" –WorkflowHostUri "https://workflowservername:port" –AllowOAuthHttp -force -scopename "nameofthescopeinworkflowmanager"
After that you might need to restart the workflows manually.
- Andre PicardCopper Contributor
Already did that and restarted the services but still doesn't work. Don't forget workflows are working in my other sites collections I just have problem with a specific site collection that I had to restore.
Thanks.
- Andre PicardCopper Contributor
Now I know what happened but not sure how to fix it. It appears that my farm administrator account was not set as the site collection administrator and that what cause the problem. I have created a "test" site collection (with my normal user account set as the site collection admin) and added a simple workflow (workflow was working). I deleted the site collection and restored it with the "Restore-spsite" powershell command (using the farm admin account) and got an access denied error. Dispite this error the site collection has been restored but workflow are no longer working.
Is there a way to fix that?
- Andre PicardCopper Contributor
I did read this and tried it just to see but I'm not using Azure ...
Thanks.