none
SharePoint Designer Error - Unexpected error on server associating the workflow RRS feed

  • Question

  • I am creating a multistep workflow with multiple Approval steps.  When I get to step 7 or the 7th Approval step and try to publish it, it states that "Errors were found when compiling the workflow.  The workflow files were saved but cannot be run."  With "Unexpected error on server associating the workflow" in the advanced section.  This same error occurs at other stages of the approvals as well.  If I put another process/action in the step, the workflow runs without any problem. 

    Thanks for the help!

    Jeremy


    Jeremy
    Thursday, June 3, 2010 7:17 PM

Answers

  • After installing SharePoint 2010 service pack 1 and CU  June I had to increase "UserDefinedWorkflowMaximumComplexity" setting using the following PowerShell commands

    Write-Host "Increasing Workflow parameter UserDefinedWorkflowMaximumComplexity..."
    $app = get-spwebapplication http://SharePointWebSiteXXX
    $app.UserDefinedWorkflowMaximumComplexity = 10000
    $app.Update()

    • Proposed as answer by odsail Thursday, October 13, 2011 3:32 PM
    • Marked as answer by Chris Grist Friday, April 6, 2012 6:29 AM
    Friday, August 5, 2011 11:59 AM

All replies

  • More Information:

    I just created a SharePoint Designer 2010 Workflow with 7 steps that just start an approval process on the current item with myself as the user.  When I publish I get the error.  When I delete the 7th step and publish it publishes fine.


    Jeremy
    Thursday, June 3, 2010 8:33 PM
  • What was 7th step?
    Friday, June 4, 2010 2:28 AM
  • All of the steps are approval steps.
    Jeremy
    Friday, June 4, 2010 2:37 PM
  • I too have hit this problem using SPD 2010 creating a custom workflow. My workflow has upto 14 "start approval process" actions. I am able to publish with the first 6 but on adding the 7th approval process I am unable to publish and get "unexpected error on server associating the workflow".

    I notice there is an appcrash (eventid 1001) on w3wp.exe in the eventlogs around the same time. Also on occasion the vs debugger tried to attach to the process although I couldn't get this to do so successfully. The dialog mentioned the w3wp.exe process id and also a stackoverflow exception on system.componentmodel.

    Is this a bug? We're thinking maybe a hard limit of some sort?

    Wednesday, September 15, 2010 11:00 AM
  • I am having the exact same issue. Has anyone found a solution?

    Thanks!

    Thursday, October 28, 2010 2:53 PM
  • It's been reproduced enough to be considered a bug, imo.  I will try to get it submitted to the appropriate people.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Thursday, October 28, 2010 4:32 PM
  • It's been reproduced enough to be considered a bug, imo.  I will try to get it submitted to the appropriate people.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force

    We're also having this issue so I'll be watching this with interest. Is it worthwhile for us to also log it?
    Sunday, November 7, 2010 10:25 PM
  • It's been reproduced enough to be considered a bug, imo.  I will try to get it submitted to the appropriate people.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force

    We're also having this issue so I'll be watching this with interest. Is it worthwhile for us to also log it?

    I logged it with the SPD team, and they acknowledged the issue - just waiting on the outcome.  It's good if others point it out, but what I do is use threads like this as references to show how often it happens.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Sunday, November 7, 2010 11:18 PM
  • Hi, same error here.

    I'm waiting for SPD Team too, incident opened. I'll let you know if I'll have good news.

    Davide

    Tuesday, November 9, 2010 12:13 PM
  • Any update on this issue? I am experiencing the same issue.

    Thanks

    Wednesday, December 1, 2010 8:53 PM
  • For anyone interested, I was able to come up with a solution that works for us. I had the same issue although it was doing that earlier than 7 approvals into the workflow. My solution was to only have 1 approval workflow started from the main workflow and have that 1 approval cycle through all the approvers needed to complete.

    I did this by adding 4 (or as many as you need) People Picker fields called Manager Step 1, Manager Step 2, etc...Then I started the workflow populating these new fields by using the Set Manager Step 1 to User Profiles: Manager (of employee/applicant), and then Set Manager Step 2 to User Profiles: Manager (of Manager Step 1), etc... I used if, then logic to make sure it stopped where it needed to and would continue to the next step in the workflow (i.e. once it populated the fields up to CEO it would stop populating and continue as it would error out if it came to an employee without a manager (CEO).

    After all the fields are populated I then started Start Manager Approvals process on Current Item with Current Item:Manager Step 1; Current Item: Manager Step2; Current Item: Manager Step 3; etc... It now works great with no issues and is a lot simpler as well.

    Hope this can be helpful to some people. :)

    I forgot to mention that you will need to Set Variable: CancelonRejection to Yes if you want the workflow to stop when a manager rejects the item.

    Wednesday, December 1, 2010 9:07 PM
  • Hi, Microsoft answered me that will release a fix for this issue on December or February CU. Actually my case with MS is still opened and I published my workflow by removing some action and making the wf lighter (there were about 60 send mail tasks, actually 48). 
    Davide Michelotto
    Wednesday, December 1, 2010 9:17 PM
  • Hi, Microsoft answered me that will release a fix for this issue on December or February CU. Actually my case with MS is still opened and I published my workflow by removing some action and making the wf lighter (there were about 60 send mail tasks, actually 48). 
    Davide Michelotto

    Excellent. Thanks for the update.
    Wednesday, December 1, 2010 9:18 PM
  • I'll be interested to see when/if this is fixed.  Currently a huge hindrance.>
    Laura Rogers
    IW Mentor: SharePoint Training
    Blog: http://www.wonderlaura.com
    Twitter: WonderLaura
    Beginning SharePoint 2010: Building Business Solutions with SharePoint
    Thursday, December 30, 2010 8:28 PM
  • Hi, Microsoft answered me that will release a fix for this issue on December or February CU. Actually my case with MS is still opened and I published my workflow by removing some action and making the wf lighter (there were about 60 send mail tasks, actually 48). 
    Davide Michelotto

    Glad to hear, Davide.  I'm surprised, because the SPD team did not respond to me after the initial direct contact.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Thursday, December 30, 2010 8:38 PM
  • Hi all, Microsoft contacted me last time on 13th Dec. The fix is planned for Feb CU (end of February).

    Clayton, it has been difficult for me too to speak with the team. I work in a Microsoft Gold Partner Company and usually open cases (IT Pro area) with answer in less than 4 hours. This time I had to push for having someone listening (I’ve been redirected to Spanish Sharepoint support) and it took two weeks.

    I suppose SPD Team and Sharepoint team support in general is very busy, probably undersized for customer needs. You surely have a better overall view and can confirm or deny this opinion.


    Davide Michelotto
    Friday, December 31, 2010 9:33 AM
  • In my cases, I have direct access to the product team and had the team lead in Korea respond to me directly saying they would look into it, but then they never responded even after I inquired again multiple times.  I usually get much more direct access through the product teams as an MVP than through my company (Gold partner as well).

    They are definitely busy working on the next version.


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Friday, December 31, 2010 6:32 PM
  • I don't believe it's a 7 Step issue, I'm getting this issue with as little as 4 steps. I'll get the error a couple of times and then it will publish without changing anything. I had a workflow running and then I had to change an if statement from "and" to "or" and it just wouldn't publish.
    Monday, January 10, 2011 5:18 AM
  • I am also having this issue. My (primary) workflow is small but splits into (4) complicated approval processes.

    I have been able to publish all of my (smaller) workflows.

    I tried the following actions:

    I made sure that the InfoPath form associated to the List was refreshed and re-published (I had a theory that this was the issue but no).
    I removed all previous versions of the workflow.
    I deleted all test approval items (the list was now empty).
    Eventually I even deleted the last good (published) version of the primary workflow.
    Rebooted numerous times and attempted to publish the workflow with no other apps running (sometimes this actually works).

    None of these fixed the issue (this time).

    I did’t think it was a permissions issue because all of my other workflows publish error free.

    Tuesday, January 11, 2011 1:03 AM
  • I rebuilt my workflow and combined all (4) approval processes into one.

    I also started looking at the file sizes of the various workflows.

    The workflow I am having an issue with is not only larger but, for a period, I  had the Show workfow visualization on status page selected and (19) .vdw files were created...

    xoml - 655KB
    xoml.rules - 532KB
    (19) .vdw files, each approx. 500KB

    Thursday, January 13, 2011 8:59 PM
  • I found that it is because of using "Start Approval Action" for 5 or more times...I got around this issue by using "Start Custom Task Action" instead of using "Start Approval Action" once i have used it for 5 times and i was successfully able to publish the SPD 2010 workflow.

    Friday, January 21, 2011 4:29 PM
  • Hi, in my case the issue is caused by "Send email action", so not related to start approval or start custom action. My workflow wasn't working with 60 email task and now is ok with about 50.

    I think the bug is related to the wf weight or something similar, not to the actions count. Anyway it's definitely a bug actually managed by MS.


    Davide Michelotto
    Friday, January 21, 2011 4:42 PM
  • Clayton,

    Have you heard anymore on this. We are in the initial config stages of SP2010 Enterprise and need WF to be functioning. I see there are a few work arounds but that is great. Can you get me to someone at the SP Designer team?

    Thanks for your help.

    Trey

    Wednesday, February 9, 2011 8:17 PM
  • hi

    had the same problem until I installed SPD directly on SharePoint Server 2010. Afterwards there aren't problems any more.

     

    Thursday, February 10, 2011 7:37 AM
  • I do have the same exact problem. Sharepoint Designer occasionally gave the same error and after a few trials it managed to publish the workflow until last week. Now it completely stopped publishing and I don't have a clue what the problem is. I rewinded the updates I made last week but nothing changed. It seems like a timeout problem to me as during publish the only process busy is IIS Worker Process and I'm curious about IIS services. It takes long time for designer to validate the workflow and that is where I think a timeout occurs. I use a powerfull laptop but cannot overcome the issue. I'll be waiting for the Microsoft update and hope that it will solve that annoying problem which forces unwanted delays in project deliveries.

    Yalin Meric

    Tuesday, February 22, 2011 1:55 PM
  • Hi, All.

    Same behaviour using MS SharePoint Designer 2007 to update a 500KB WF in a medium-sized farm with MOSS 2007. I've tried:

    1. Clearing the SPD Cache.
    2. Reboot the Servers
    3. Add in my etc/Host file a reference to the webApplication.
    4. check every server HOST file to see any errors.

    I haven't been able to get any clear messages from SharePoint Logs.

    Regards,

    Friday, March 4, 2011 10:34 AM
  • Hi all,

    Sharepoint 2010 February CU has been released today. There is still no documentation about the hotfix but MS support informed me that this will solve the publishing workflow bug.

    Here the link: https://blogs.technet.com/b/stefan_gossner/archive/2011/03/04/delayed-february-2011-cu-for-sharepoint-2010-is-now-available.aspx

    I’ll check the fix on next week, hoping this will works.

    Davide


    Davide Michelotto
    Friday, March 4, 2011 1:19 PM
  • Hi everyone,

    I have applied latest February CU for Sharepoint server and Office update but issue with 6th approve step still exist. What next and how solve it I dont now:(

    Sincerely Radek 

    Sunday, March 6, 2011 11:17 PM
  • Hi All.

    Still no solution.  I've checked the MOSS Log for an error. Nothing. I've checked the IIS Logs for an error (just to be sure). Nothing. I turned to the Event Viewer to see if there was something. Nothing.  Searching Internet I've found some people who:

    • Had a Third party component, that was causing the problems. Not my case (MOSS 2007 installed, hardened and without external components).
    • Deployed an in-house developed Workflow Solution, created with Visual Studio. Not my case (I'm using MOSS 2007 default workflow actions).
    • Had a wrong reference to System.Workflow.ComponentModel.WorkflowCompiler DLL. How can this be possible? I mean: if I install MOSS and every update, the DLL should always be the same.

    Kind of driving me cazy.

    Thanks in advance..

    Wednesday, March 9, 2011 10:40 AM
  • My workflow stopped after 6 Approval flow. I created 6 Approval flows and one Custom Task and i managed to publish my flow. Thanks Sanjai.
    Thursday, March 31, 2011 12:19 PM
  • Has anyone had any success with this after applying the Feb 2011 CU? We did apply the CU the week after it was re-published and still have this issue popping up.

    I am building out a fairly long but straightforward approval/feedback workflow that routes a document set through a sequential set of approvers/committees which are assigned by lookups done when the workflow starts and routes the doc set to the right people for approval. I was able to get 4 approval steps going with corresponding feedback steps before the error popped up. Removing the feedback steps allowed more approval steps but I'm having to try to split my workflow into primary and secondary in order to fit in all the parties that need to approve the doc set. Ideally I would want this in one workflow so that workflow initiators can have one status page to view approval progress.

    Monday, April 4, 2011 2:07 PM
  • C:\inetpub\wwwroot\wss\VirtualDirectories\xxxx\web.config
    I added a executionTimeout value which fixed my problem
    <httpRuntime maxRequestLength="51200" />
    <httpRuntime maxRequestLength="51200" executionTimeout="300" />
    • Proposed as answer by Amien123 Thursday, June 7, 2012 3:34 AM
    Friday, April 8, 2011 1:52 PM
  • Hi Vioramo,

     

    Setting the execution time in the web config also fixed my issue also!

     

    Mark 

    Monday, May 30, 2011 10:06 AM
  • After wasting 3 hours on this issue, I finally followed vioramo's suggestion of adding executionTimeout and it fixed it for me. 
    Thanks a ton vioramo!

    Thursday, June 9, 2011 5:45 PM
  • Thanks Vioramo. That fixed my issue :)

    But what exactly does that error mean. Why would designer not publish the workflow with out setting the execution time out?

     

     

    Thursday, June 9, 2011 9:25 PM
  • Hi

    Vioramos solution wasn't helpful for my problem. I have several steps with 5 approval processes and 1 custom process. Summary about 50 actions in parent workflow. 

    executionTimeout with value 300 not solved my problem. Solved problem by optimizing subprocesses - deleting unused steps.

    Is Microsoft published fix for this?

    Tuesday, June 21, 2011 3:20 AM
  • I too am having the same issue, when I check for errors there are none, but then when I try to publish I get the exact same error as the original posting. Does anyone know if there is a fix to this??
    Wednesday, June 29, 2011 2:14 PM
  • Stardevil,

     

    The solution mentioned by Viramos helped me.

    C:\inetpub\wwwroot\wss\VirtualDirectories\xxxx\web.config
    I added a executionTimeout value which fixed my problem
    <httpRuntime maxRequestLength="51200" />
    <httpRuntime maxRequestLength="51200" executionTimeout="300" />

     

    Add this execution Timeout parameter in the web.config file and it should fix your problem.

    If it still exists try to increase or decrease the execution timeout.

    • Proposed as answer by Malineni Thursday, September 8, 2011 6:27 PM
    Wednesday, June 29, 2011 2:21 PM
  • As many have mentioned in this message thread, increasing the excutionTimeout should fix the issue. 

    Initially my SPD reusable workflow contained 5 to 7 Approval Tasks, and as I add each Approval Task,
    I can literally notice the longer time it takes to publish the workflow...and eventually timing out with
    obscure error mentioned in this thread's title.  

    I find that SPD Approval Task is quiet heavy, so I ended up switching some of them to much lighter Custom Tasks
    and that also reduced the overall workflow publish time which also prevents this condition.  

    The major drawback of using Custom Tasks is you may need to define additional processing that you get for 
    free when you use the Approval Task. 


    John Im
    Thursday, June 30, 2011 2:17 AM
  • Hi John, I have the same problem, several Approval Task and failed the Upload

    I ask you, how can I buil that Custom Task to be similar to de Default Approval process, I don´t known how can I build that task

    Thank you!!


    Sergio Fathala - MCSE 2003
    Friday, July 22, 2011 6:07 PM
  • Changing the executionTimeout should work and that may be quicker solution.

     

    However, if you are up for some coding:

    Click on one of the Approval Task, and under the "Customization" section, you should see the following:

    "Change the completion conditions for this task process"
    "Change the behavior of a single task"
    "Change the behavior of the overall task process"

    By studying the built-in code the Approval task, you can customize the custom task with similar code.  


    John Im
    Friday, July 22, 2011 6:29 PM
  • After installing SharePoint 2010 service pack 1 and CU  June I had to increase "UserDefinedWorkflowMaximumComplexity" setting using the following PowerShell commands

    Write-Host "Increasing Workflow parameter UserDefinedWorkflowMaximumComplexity..."
    $app = get-spwebapplication http://SharePointWebSiteXXX
    $app.UserDefinedWorkflowMaximumComplexity = 10000
    $app.Update()

    • Proposed as answer by odsail Thursday, October 13, 2011 3:32 PM
    • Marked as answer by Chris Grist Friday, April 6, 2012 6:29 AM
    Friday, August 5, 2011 11:59 AM
  • VIORAMO U R A GENIUS! THANK U VERY MUCH. THE executionTimeout PARAMETER, SOLVED THE PROBLEM.

    BYE.

    LUKAS VALLEJO MELUK

    Tuesday, August 30, 2011 4:28 PM
  • I had workflow giving the same error. It's a workflow with 6 approvals. 

    I tried adding the ExecutionTimeout parameter but that didn't do the trick yet, tried increasing it to 1000 but still no difference.

    After that I did three things: I checked the file for more instance of the httpRuntime parameter, I found two more, both with a executionTimeout of 3600. I increased the paramater of the first one to 3600 too.

    I noticed that in the other instances of the parameter the field maxRequestLength had a larger value also, so I changed that one too to the same amount as the other instances (which are "2097175"). 

    I did the thing noticed above, the UserDefinedWorkflowMaximumComplexity setting. 

     

    I don't know which of the three did the trick but after these 3 changes I could publicate the workflow.

    Besides that it also solved a strange other problem, the last couple of days i couldn't use the old version of the workflow anymore, without any change it suddenly generates an error "failed to start" and "workflow canceled by system account". After changing the variables this workes again also. 

    It looks like something is taking too much time, first only publicating the workflow but afterwards also running the workflow timed out. Maybe the system slowed down because of intensive use and now crossed a timeout line.

    So Thanks for putting me on the right track Vioramo.


    Erik Spijkerman

    Wednesday, October 5, 2011 12:08 PM
  • Vioramo - I've read this entire post and was curious if your previous recommended solution of increasing the "ExecutionTimeout" to 300 in the web.config no longer works after applying SP1 and June 11 CU which is why you have come up with this recommended change to increase the complexity property.  

    Also, do you know what the default value is for this property?

    Thanks!

    Scott

    • Proposed as answer by odsail Thursday, October 13, 2011 3:32 PM
    • Unproposed as answer by odsail Thursday, October 13, 2011 3:32 PM
    Thursday, October 13, 2011 2:12 PM
  • Vioramo - I found after changing the ExecutionTimeout in the web.config did not resolve my problem.  However, setting the UserDefinedWorkflowMaximumComplexity property = 10000 did resolve my issue.  Robert Bogue blogged about this here. http://www.thorprojects.com/blog/archive/2011/07/11/sharepoint-workflow-userdefinedworkflowmaximumcomplexity.aspx

    I may need to re-factor my workflow to replace Approval WF's tasks with Custom WF tasks.  I wish that SharePoint Designer would provide better errors.  This doesn't seem like it would be too difficult to resolve.  The current error message might as well say go buy some lottery tickets or nothing at all.

    Thanks again for your help today!


    Scott

    Thursday, October 13, 2011 3:37 PM
  • You are a life saver Vioramo. I increased the timeout and it worked, I haven't ran the powershell command yet.  One question, after you ran the command, did the time it take you to publish dcreased?

    It is stilll taking too long form me to publish (1-2 min)

    Thank you!


    ITGirl
    Wednesday, October 26, 2011 6:12 PM
  • Hello Vioramo,

    According to your response i have done changes to the web config file to include the executionTimeout Tag.It was perfectly working fine for my workflow.But Recently we have upgraded our sharepoint environment by installing Sharepoint 2010 SP1.After upgradation the workflow is started giving the same error again.would you please let me know whether the above mentioned powershell commamnd we need to run in our all web front end, Application and Central Admin Server in order to resolve the issue?

    Thank you very much for your help.

    Regards,

    Lokanath

     


    Lokanath Chhatria
    Tuesday, November 29, 2011 4:43 AM
  • Joseph Becker

    Hi, I just started working with sharepoint designer 2010 and infopath designer 2010. I am stuck with this 7th step approval, tried every suggestion posted but didn't solve my problem, really interested with your suggestion but no idea on how to do it, care to guide me on this one, thanks!

    Tuesday, March 20, 2012 8:05 AM
  • <httpRuntime maxRequestLength="51200" executionTimeout="300" />

    That's solved my problem. Thank you.

    Wednesday, March 21, 2012 7:15 AM
  • Thank you Vioramo

    i am able to publish my workflow after applying your solution.


    Thanks & Regards Raj

    Monday, April 2, 2012 5:43 AM
  • Hi Vioramo,

    I tried both ways - setting UserDefinedWorkflowMaximumComplexity and executionTimeout. Both didn't work for me. Do you have any other solution? Please advise. 

    Thanks in advance,

    Naush

    Tuesday, June 19, 2012 2:23 PM
  • This was a good one! I changed the WebConfig, restarted IIS and all of a suddent all troubles were gone... SPD works 3 times faster now and does not crash... who would have thought :) THX Man!

    Filip Stankiewicz

    Tuesday, July 17, 2012 12:38 PM
  • C:\inetpub\wwwroot\wss\VirtualDirectories\xxxx\web.config
    I added a executionTimeout value which fixed my problem
    <httpRuntime maxRequestLength="51200" />
    <httpRuntime maxRequestLength="51200" executionTimeout="300" />

    Thank you, Vioramo - you make me happy!
    Thursday, September 6, 2012 12:44 PM
  • I too have hit this problem using SPD 2010 creating a custom workflow.

    if any updates please provide

    thanks

    Monday, October 22, 2012 2:37 PM
  • Just started experiencing this issue on an Office 365 site (recently updated to v15.0.04433).  I only wish I could set executionTimeout in my web.config or increase the UserDefinedWorkflowMaximumComplexity.  My workflow is extremely simple; if Job Status = "Waiting for Parts", send a simple email to 2 people with a link to the item.  That's it.  The same workflow works on 2 other form libraries in the site collection.

    Thursday, November 29, 2012 2:23 AM
  • Just started experiencing this issue on an Office 365 site (recently updated to v15.0.04433).  I only wish I could set executionTimeout in my web.config or increase the UserDefinedWorkflowMaximumComplexity.  My workflow is extremely simple; if Job Status = "Waiting for Parts", send a simple email to 2 people with a link to the item.  That's it.  The same workflow works on 2 other form libraries in the site collection.


    Odd...there are 2 other workflows associated with this library.  As a test, I removed one of the others and now it works.  Very odd behavior. 
    Thursday, November 29, 2012 2:28 AM
  • Hello,

    I am trying to update my web.config file, but I am not very technical and unable to find it.  I tried the web and my C drive.  Our Sharepoint is also hosted in a different country, would that be my issue?

    Thanks,

    Sean

    Thursday, March 21, 2013 6:41 PM
  • C:\inetpub\wwwroot\wss\VirtualDirectories\xxxx\web.config
    I added a executionTimeout value which fixed my problem
    <httpRuntime maxRequestLength="51200" />
    <httpRuntime maxRequestLength="51200" executionTimeout="300" />

    This worked for me.
    Thursday, April 4, 2013 4:01 AM
  • Hello,

    I am trying to update my web.config file, but I am not very technical and unable to find it.  I tried the web and my C drive.  Our Sharepoint is also hosted in a different country, would that be my issue?

    Thanks,

    Sean


    The web.config file is on your SharePoint server. You need to be able to access your server and modify that file.

    • Edited by Lin Zhang Thursday, April 4, 2013 4:10 AM
    Thursday, April 4, 2013 4:03 AM
  • Thanks Lin,

    I communicated with the people who run our server and they told me to change to a simpler process by using Start Custom Task Process instead od the Start Approval process.  I few users mentioned this in the thread, but I am unable to find out how to use the Task process to mimic the approval process.  Are there any examples or threads out there in regards to this?

    Thanks,

    Sean

    Monday, April 8, 2013 5:29 PM
  • I have been having the same issue. My workflow worked and was published in the test environment with no issues and I have 8 Start Approval processes. When it was moved to production, only the first 5 work. I checked the 'Start Custom Task Process' and tried replicating the 'Start Approval Process', but as you may be aware there are variables in 'Start Approval Process' that are not found in 'Start Custom Task Process' Yuck.

    I don't know what broke. When the site was moved to production, I was requested to recreate the workflow in production and I don't believe this cause it to fail, but just about anything is possible. Also, I just found an article indicating this is an issue even with 2013. Another fix that I found was to increase the limit:

    $app.UserDefinedWorkflowMaximumComplexity = 7000 (which is default) to 30000

    


    Richell A. Grant

    • Proposed as answer by M. Cao Wednesday, September 4, 2013 9:55 PM
    Thursday, May 2, 2013 7:15 PM
  • We ended up cuting our workflow down from 8 Start Approvals to 4 Start Approval processes and are using the parallel option in the email.  :)

    Richell A. Grant

    Friday, May 3, 2013 4:12 PM
  • Vioramo you are Great! Your following solution worked for me after I wasted more than 2 hours:

    C:\inetpub\wwwroot\wss\VirtualDirectories\xxxx\web.config
    I added a executionTimeout value which fixed my problem
    <httpRuntime maxRequestLength="51200" />
    <httpRuntime maxRequestLength="51200" executionTimeout="300" /> 

    Thanks  a million

    Atif


    Sunday, June 2, 2013 10:14 PM
  • I am using SharePoint 2013 and run into the same issue. By applying Vioramo's solution to increase the complexity  to 10000, the problem is solved.  Many thanks to Vioramo!
    Wednesday, September 4, 2013 9:57 PM
  • We're getting the issue with SharePoint 2013... if we login as certain administrators - e.g. install account - they can publish the workflow OK. Other can't. Changing complexity setting above doesn't help.

    Restarting IIS however did work (so executionTimeout could be a coincidence as it would recycle the app pool).

    It seems this error could be triggered by another related error (and then it gets stuck and requires another IIS Reset):

     - "Errors were found when compiling the workflow. The workflow files were saved but cannot be run" / "(0, 0) Acitvity 'IDX' validation failed: Cannot resolved Activity 'X'.). 

    This occurred when we tried to consolidate (copy/paste) multiple workflow steps into a single workflow. 

    • Edited by Peter_D503 Monday, October 14, 2013 6:48 AM
    Monday, October 14, 2013 6:21 AM
  • I was having the same issue with SP 2013 enterprise and designer 2013.
    changed UserDefinedWorkflowMaximumComplexity to 30000. 10000 did not work for me.
    Changed web.config on front end server and app server, stopped and started IIS on both.  
    <system.web>       <httpRuntime maxRequestLength="51200" executionTimeout="300" requestValidationMode="2.0" />

    After that it works fine.
    Thanks for the solutions. 

    FYI, I was getting the same errors:  "(0, 0) Acitvity 'IDX' validation failed: Cannot resolved Activity 'X' from copy and paste. 
    I resolved these by finding the offending activity 'X' and replacing it with the correct one in the workflow xoml (in SPD, go to all files, Workflows, workflow name,workflow name.xoml.  right click and open with --> SPD (open as XML)):

    IE:
        <ns0:ClearHashtableActivity Collection="{x:Null}" x:Name="ID49" />
        <ns0:AddToHashtableActivity Collection="{ActivityBind ID30,Path=Collection}" Key="Item" x:Name="ID50" ValueType="Text">
        <ns0:AddToHashtableActivity Collection="{ActivityBind ID30,Path=Collection}" Key="Quantity" x:Name="ID53" ValueType="Number">

    Changed to

        <ns0:ClearHashtableActivity Collection="{x:Null}" x:Name="ID49" />
        <ns0:AddToHashtableActivity Collection="{ActivityBind ID49,Path=Collection}" Key="Item" x:Name="ID50" ValueType="Text">
        <ns0:AddToHashtableActivity Collection="{ActivityBind ID49,Path=Collection}" Key="Quantity" x:Name="ID53" ValueType="Number">

    doing this made the error go away.

     

    Thursday, January 30, 2014 6:16 PM
  • I am facing a similar issue mentioned by Peter_D503 and Chris JL.

    Error: "Errors were found when compiling the workflow.  The workflow files were saved but cannot be run."  With "Unexpected error on server associating the workflow" in the advanced section. 

    I am using SPD 2013 on SharePoint Enterprise 2013. I have tried below solution, but none of them worked for me.

    1. <httpRuntime maxRequestLength="51200" executionTimeout="500" />

    2. $app = get-spwebapplication "http://WEBAPP-URL"

    $app.UserDefinedWorkflowMaximumComplexity = 50000
    $app.Update()

    Please help

    Tuesday, February 4, 2014 12:10 PM
  • I have a very simple workflow that just creates a Ticket Number and sends emails to requestors when their Help Desk ticket has been updated.   The workflow was publishing fine when I only had the first step (create a Ticket Number).   After I added the Actions to Send an email, I started getting the error.  I can submit a ticket to the Admin team(they have access to the server) to perform the solution mentioned by Vioramo but I know there are far more complex workflows that have been running in my site collection. I haven't heard of any problems with those workflows.  Furthermore, I'm a little hesitant to submit a ticket because my Admin Team has steered me wrong before.   What is the reason for increasing the "UserDefinedWorkflowMaximumComplexity"?   
    Tuesday, March 6, 2018 9:15 PM