{"id":1086,"date":"2013-02-19T21:01:33","date_gmt":"2013-02-19T21:01:33","guid":{"rendered":"http:\/\/turtlellc.com\/?p=1086"},"modified":"2017-09-22T20:01:38","modified_gmt":"2017-09-22T20:01:38","slug":"sp-workflow-failed-start-error","status":"publish","type":"post","link":"https:\/\/www.turtle.works\/knowledge\/sp-workflow-failed-start-error\/","title":{"rendered":"SP Causes Workflow &#8220;Failed to Start&#8221; Error"},"content":{"rendered":"<h2>Problem<\/h2>\n<p>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\u00a0error:<\/p>\n<p><a href=\"http:\/\/turtlellc.com\/wp-content\/uploads\/2013\/02\/FailedToStart1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1093\" src=\"http:\/\/turtlellc.com\/wp-content\/uploads\/2013\/02\/FailedToStart1.png\" alt=\"FailedToStart\" width=\"112\" height=\"33\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><!--more--><\/p>\n<h2>Cause<\/h2>\n<p>Running <strong>ULS Viewer<\/strong> showed me:<\/p>\n<p style=\"padding-left: 30px;\"><em>Workflow dll \u00a0failed to compile because it exceeded UserDefinedWorkflowMaximumComplexity of 5000<\/em><\/p>\n<p style=\"padding-left: 30px;\"><a href=\"http:\/\/turtlellc.com\/wp-content\/uploads\/2013\/02\/ULSViewer-Error-e1361309054599.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1089\" src=\"http:\/\/turtlellc.com\/wp-content\/uploads\/2013\/02\/ULSViewer-Error-e1361309157359.png\" alt=\"ULSViewer Error\" width=\"630\" height=\"21\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>I then remembered having to change this setting a 18 months ago when I first built the workflows.<\/p>\n<h2>Solution<\/h2>\n<p>To modify the UserDefinedWorkflowMaximumComplexity setting, use the following PowerShell:<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #3366ff;\">[System.Reflection.Assembly]::LoadWithPartialName(&#8220;Microsoft.SharePoint&#8221;)\u00a0<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #3366ff;\">$new_limit = 15000;<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #3366ff;\">$webapp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup(http:\/\/WebAppURL)\u00a0<\/span><br \/>\n<span style=\"color: #3366ff;\">$webapp.UserDefinedWorkflowMaximumComplexity = $new_limit\u00a0<\/span><br \/>\n<span style=\"color: #3366ff;\">$webapp.Update()<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem 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\u00a0error: &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,21],"tags":[],"class_list":["post-1086","post","type-post","status-publish","format-standard","hentry","category-sharepoint","category-sharepoint-2010"],"_links":{"self":[{"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/posts\/1086","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/comments?post=1086"}],"version-history":[{"count":1,"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/posts\/1086\/revisions"}],"predecessor-version":[{"id":1712,"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/posts\/1086\/revisions\/1712"}],"wp:attachment":[{"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/media?parent=1086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/categories?post=1086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/tags?post=1086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}