Skip to content

Workflow validation failed with large workflows

Problem

The error message below appears when you are trying to order a very large process. The general recommendation is always to refactor your process into several processes instead of increasing the maximum workflow size in Workflow Manager.

Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors: The size of the activity XAML is 5680 KB, which is greater than the maximum allowed size of 5120 KB

This solution is done on your own risk. We do not fully know the effect of increasing the allowed maximum size of workflow XAMLs.

Solution

Run the following Powershell command on the server hosting Workflow Manager. If you have several Workflow hosts the first command can be run on any host but you need to restart the webserver on each host.

The URI can be found by running Get-WFFarm and checking the Endpoint property.

# This will double the allowed max size of the workflows
Set-WFServiceConfiguration -Name "WorkflowServiceMaxActivityXamlSizeInBytes" -ServiceUri "<<uri>>:12290" -Value 10485760

iisreset

Troubleshooting guidelines