Geeks With Blogs

News invisible hit counter View My Stats
Technical Speaking

Errors were found when compiling the workflow. The workflow files were saved but cannot be run.

Advanced: Unexpected error on server associating the workflow

This is a SharePoint 2010 SP1 Bug and Error message is not meaningful to solve it or why this error is occurring Sad smile.

I found and faced a stupid SPD workflow publish Error during Last SP Deployment in Pre-Production & Production Server in Client End. I google it and found many people got the following Error “Error were found when compiling the workflow”.

2012-12-31_1507

There are several solutions with several replies in forum which confused me to solve the problem and Some solutions worked for my pre-Production Server but Doesn’t work for Production Environment. Production Environment were fixed after doing some additional steps. That’s why, I Planned to write a post on this error to help people who might face similar error.

So,  Let me explain you my scenario first and how to solved this problem step by step.

Scenario:

My Team developed a SPD Workflow which is running fine in the Development Environment (SharePoint Server 2010 RTM – Build Version 14.0.4762.1000) without any error.  When I tried to Deployed in Pre-Production Environment (SharePoint Server 2010 SP1 – Build Version 14.0.6029.1000), I was unable to Restore site due to Upper Version.

I upgraded the development Environment to 14.0.6029.1000 as same as Pre-Production and Restored the SharePoint Site in Pre-Production.

But Workflow Failed to Start

So when I tried to Publish workflow again using SharePoint Designer, I got the above error even from Development Server. It Means this is SP1 Bug for this specific version.

Solution:

To resolve this issue, install the hotfixes that are provided in the following articles in the Microsoft Knowledge Base:

2687614 (http://support.microsoft.com/kb/2687614/ )

Description of the SharePoint Server 2010 hotfix package (Coreservermui-xx-xx.msp): October 30, 2012

2687557 (http://support.microsoft.com/kb/2687557/ )

Description of the SharePoint Foundation 2010 hotfix package (Wss-x-none.msp): October 30, 2012

I installed those in the Pre-Production Server and Update my Farm. Each time I run “SharePoint 2010 Products Configuration Wizard” to Update Farm (It is required to Update Farm who doesn’t know about it)

Error still not solved !!!

Finally I did the following:

Open SharePoint management shell as administrator and run the bellow command

$app = get-spwebapplication http://portal.contesto.com
$app.UserDefinedWorkflowMaximumComplexity = 10000
$app.Update()

Then I try to publish the workflow and it works without any problem.

I found Details at http://support.microsoft.com/kb/2557533

 

Final Steps:

The above solution doesn’t work in the Production and confused what to do.

Possible reason(s) I realized its something to do with SPD to Web Application communication. So I guess it was request size / timeout related issue.

Finally, I increased the web application execution time to Solve this Problem

1. Navigate to web.config file of the WebApplication
Usually its

@ C:\inetpub\wwwroot\wss\VirtualDirectories\xxxx\web.config

2. Look for this

<httpRuntime maxRequestLength="51200" />
3. Replace with
<httpRuntime maxRequestLength="51200" executionTimeout="300" />

That's all.

PROBLEM SOLVED!!!

Posted on Tuesday, January 29, 2013 12:14 PM SharePoint 2010 | Back to top


Comments on this post: Resolving SharePoint Workflow Publish Error

# re: Resolving SharePoint Workflow Publish Error
Requesting Gravatar...
It is working perfect.
Left by Shovon Kumar Pramanik on Feb 15, 2013 5:50 PM

# re: Resolving SharePoint Workflow Publish Error
Requesting Gravatar...
Thank you so much for the httpRuntime executionTimeout hint! Saved my day!
Left by Petr Novak on Sep 25, 2013 9:40 PM

# re: Resolving SharePoint Workflow Publish Error
Requesting Gravatar...
You are awesome dude. Thankyou soomuch for the post.
Left by lalit kanchi on Apr 10, 2014 5:04 AM

# re: Resolving SharePoint Workflow Publish Error
Requesting Gravatar...
$app.UserDefinedWorkflowMaximumComplexity = 10000
worked for me thanks
Thanks
Left by Chris cox on Apr 11, 2014 10:36 PM

# re: Resolving SharePoint Workflow Publish Error
Requesting Gravatar...
"$app.UserDefinedWorkflowMaximumComplexity = 10000" is a mandatory action for this solution to work???
I was trying just to edit "web.config".
Left by Julio Maggieri on May 14, 2014 11:28 PM

# re: Resolving SharePoint Workflow Publish Error
Requesting Gravatar...
Thanks for this help. It worked. I have just signed up for a free SharePoint site with http://www.cloudappsportal.com.
Left by Sophia on May 23, 2014 2:23 PM

# re: Resolving SharePoint Workflow Publish Error
Requesting Gravatar...
Yes this is required to solve it though it depends on Complexity of Workflow (nested)
Left by MJ Ferdous on May 27, 2014 5:23 PM

# re: Resolving SharePoint Workflow Publish Error
Requesting Gravatar...
Mitou mano !
Left by Matheus on May 28, 2014 5:13 AM

# re: Resolving SharePoint Workflow Publish Error
Requesting Gravatar...
I resolved the same exact issue by changing just LABEL (property of wf) of the workflow.
Left by Miro R on Jun 26, 2014 1:11 AM

# re: Resolving SharePoint Workflow Publish Error
Requesting Gravatar...
Thank you, this solved my problem for publishing complex workflows
Left by Tim Demoor on Jan 15, 2015 10:44 PM

# re: Resolving SharePoint Workflow Publish Error
Requesting Gravatar...
Thank you itz working fine
Left by beaulah on Sep 30, 2015 8:25 PM

# re: Resolving SharePoint Workflow Publish Error
Requesting Gravatar...
Glad to know that it is working for most of you.
Left by Admin on Oct 22, 2015 9:18 PM

# re: Resolving SharePoint Workflow Publish Error
Requesting Gravatar...
Thanks ... working fine
Left by avinash on Jan 22, 2016 11:48 AM

Your comment:
 (will show your gravatar)


Copyright © MJ Ferdous | Powered by: GeeksWithBlogs.net