Unexpected errors when working with SharePoint 2010 workflows

Recently a client of mine contacted me about issues when creating workflows in SharePoint 2010.  It wasn’t too complex with only 6-7 steps.  While they were designing, it started throwing the following error when publishing: Unexpected error on server associating the workflow.

First, I used the following PowerShell script under the SharePoint management console to increase the UserDefinedWorkflowCompexity limit.

$app = get-spwebapplication http://sharepointurl/ 
$app.UserDefinedWorkflowMaximumComplexity = 40000

After running the script, the executionTimeout was changed under the site’s web.config file.

<httpRuntime maxRequestLength="51200" executionTimeout="300" />

Finally, when finished, issue an IISRESET.

Leave a Reply

Your email address will not be published. Required fields are marked *