I have some rather complex SPD workflows built. Complex meaning multiple approval levels and multiple tasks. Recently we applied SP1 to our SharePoint Server 2010 environment as well as a recent Cumulative Update (CU). After the update 2 of the workflows began showing this error:
Running ULS Viewer showed me:
Workflow dll failed to compile because it exceeded UserDefinedWorkflowMaximumComplexity of 5000
I then remembered having to change this setting a 18 months ago when I first built the workflows.
To modify the UserDefinedWorkflowMaximumComplexity setting, use the following PowerShell:
$new_limit = 15000;
$webapp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup(http://WebAppURL)
$webapp.UserDefinedWorkflowMaximumComplexity = $new_limit