This SharePoint workflow tutorial explains how to solve error: Register-SPWorkflowService: Workflow XAML failed validation due to the
Invalid typ (s) ‘Microsoft.Activities.CacheScope’.
HTTP headers received from the server – ActivityId.
The error comes while Registering SPWorkflowService while configuring Workflow manager 1.0 for SharePoint 2016. After configuring workflow manager 1.0, while running the PowerShell command to register workflow service, I got the below error.
Register-SPWorkflowService -SPSite “http://mypc/sites/MySP2016SiteCollection/” -WorkflowHostUri “http://localhost:12291” -AllowOAuthHttp -Force
After running the above PowerShell command, the error comes as:
Register-SPWorkflowService: Workflow XAML failed validation due to the
Invalid type(s) ‘Microsoft.Activities.CacheScope’.
HTTP headers received from the server – ActivityId:
07a06348-b8bd-4a9c-b6d6-cd3ce7ba7685. NodeId: MYPC. Scope: /SharePoint. Client
ActivityId : caa7829d-b770-b073-3e38-2ef805a24d76.
At line:1 char:1
+ Register-SPWorkflowService -SPSite
“http://mypc/sites/MySP2016SiteCollection/” – …
+ CategoryInfo : InvalidData: (Microsoft.Share…WorkflowService:
RegisterSPWorkflowService) [Register-SPWorkflowService], ActivityValidatio
+ FullyQualifiedErrorId : Microsoft.SharePoint.WorkflowServices.PowerShell
See the fig for more about the error:
Solution to Register-SPWorkflowService Workflow XAML failed validation
Below is the solution to resolve Register-SPWorkflowService Workflow XAML failed validation error.
Then I restarted my machine and run the above PowerShell command. This is not a mandatory step, but if without restarting it did not work then restart the machine once and try, it should work fine.
You may like following SharePoint workflow tutorials:
- SharePoint Designer cannot display the item error while opening SharePoint 2013 designer workflow
- SharePoint 2013 designer workflow error Workflow canceled failed to start
- Assign A Task Action in Nintex Workflow for Office 365 SharePoint online
- Get all workflows from all site collections using the server object model in SharePoint 2013
- Error were found when compiling the workflow. The workflow files were saved but cannot be run.
- SharePoint 2013 Workflow suspended error An unhandled exception occurred during the execution of the workflow instance
- How to cancel all workflows having Suspended state in SharePoint 2013?
Hope this will be helpful to solve Register-SPWorkflowService Workflow XAML failed validation error in SharePoint 2013/2016.
You May Also like the Following SharePoint Tutorials: