Saturday, December 8, 2012

SharePoint Designer 2010: Workflow Error - Unexpected error on server associating the workflow

Option 1: Add executionTimeout at web.config
Reference 1: http://www.manjuke.com/2011/05/fixed-sharepoint-designer-error.html
Reference 2: http://social.msdn.microsoft.com/Forums/

Step 1: Open the ‘web.config’ which associate with the site collection that you are publishing the workflow:

C:\inetpub\wwwroot\wss\VirtualDirectories\xxxx\web.config
Note: xxxx is a Port Number.

Step 2: Find maxRequestLength and add executionTimeout as follows:

Before:   <httpRuntime maxRequestLength="51200" />
After:      <httpRuntime maxRequestLength="51200" executionTimeout="300" />

Step 3: Save the ‘web.config’ file and restart the web site from IIS. Then you can publish the workflow without any issue.


Option 2: Set new UserDefinedWorkflowMaximumComplexity at Windows Power Shell
Reference: http://support.microsoft.com/kb/2557533

By installing a CU that includes the server February 2011 CU, SharePoint administrators are now able to prevent compilation of workflows whose compilation would affect the performance of the farm. The default value of the property is 7000, but can be changed based on the needs and profile of the SharePoint farm.

The following PowerShell script can be used to adjust the value per SPWebApplication:

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$new_limit = 5000;
$webapp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup(http://WebAppURL)
$webapp.UserDefinedWorkflowMaximumComplexity = $new_limit
$webapp.Update()

E.g.: Write-Host "Increasing Workflow parameter UserDefinedWorkflowMaximumComplexity..."

$app = get-spwebapplication http://SharePointWebSiteXXX
$app.UserDefinedWorkflowMaximumComplexity = 10000
$app.Update()


To give context to the default 7,000 value a Start Approval Process action contains 1176 nodes, a Start Feedback Process action contains 1010 and an empty Start Custom Task Process contains 13 nodes.

Please note, up to certain number, roughly 10000, the compliation will be restricted by Microsoft .NET 3.0 workflow complier so the workflow size still has a ceiling. At that point, the larger workflows need to be restructured to either have more reusable pieces, or be broken out into smaller individual small workflows.

1 comment:

  1. My Development Notes: Sharepoint Designer 2010: Workflow Error - Unexpected Error On Server Associating The Workflow >>>>> Download Now

    >>>>> Download Full

    My Development Notes: Sharepoint Designer 2010: Workflow Error - Unexpected Error On Server Associating The Workflow >>>>> Download LINK

    >>>>> Download Now

    My Development Notes: Sharepoint Designer 2010: Workflow Error - Unexpected Error On Server Associating The Workflow >>>>> Download Full

    >>>>> Download LINK RJ

    ReplyDelete