I'm unable to publish a workflow in Sharepoint Designer 2013, errors are found when compiling the workflow. The workflow files were saved but cannot be run.

I even tried to delete SPD Cache folder, without results.

I get below error:

(0, 0) Activity 'ID245' validation failed: Cannot resolve Activity 'ID232'.)
(0, 0) Activity 'ID355' validation failed: Cannot resolve Activity 'ID340'.)
(0, 0) Activity 'ID369' validation failed: Cannot resolve Activity 'ID340'.)
(0, 0) Activity 'ID383' validation failed: Cannot resolve Activity 'ID340'.)
(0, 0) Activity 'ID397' validation failed: Cannot resolve Activity 'ID340'.)


  • Any answer ? I'm facing the same issue.
    – Nate B.
    Commented Aug 28, 2013 at 8:18
  • Well... I faced the same issue when I created a 2010 Workflow through Sharepoint Designer 2013. I added a Approval Task Process and set my task and so on. Suddenly, the error. No answer could not be found, even here. So, I decided to delete my Approval Task Process, create a new one and... no more error. But I still have no idea why this happened. If someone knows...
    – Nate B.
    Commented Aug 28, 2013 at 12:30
  • 1
    Brendan Murphy's Answer fixed this issue for me without having to recreate the flow from scratch
    – Aaron
    Commented Aug 16, 2016 at 16:08

11 Answers 11


Bit late to the show (well over a year!) but hopefully will help anyone who comes across this as I just did on Google! I had the problem when I copied and pasted activities in a SharePoint 2010 workflow using SPD designer 2013. My solution was to simply cut and paste the entire workflow into the same window and it all worked!!

Hope that helps someone in future.

  • This actually works! Commented Mar 2, 2017 at 8:49
  • This worked!!, I had to then just fix some values in red, by swapping them to something else then the original and it worked
    – BinaryJam
    Commented Apr 25, 2018 at 13:20
  • Great, it worked for me. Commented Nov 16, 2018 at 11:38
  • 2
    you are a legend
    – Unnie
    Commented Mar 13, 2019 at 14:36
  • 1
    Life savior!!! worked charm
    – mzonerz
    Commented Jul 16, 2019 at 12:04

I believe that this problem is due to using Copy/Paste in the text-based workflow designer. I wanted to create a workflow that repeated the same action four times, seemed like creating the action once, copying it, and pasting it would be a slam dunk.

But using copy/paste gave me the "cannot resolve activity id" error. Creating each step manually worked just fine.

  • 2
    I have seen this many times myself. Unfortunately, SharePoint fails to properly manage in-memory state making what-should-be-trivial tasks far more difficult than necessary. I'm not sure why they support copy-n-paste when supporting it makes the product less usable.
    – Mario
    Commented Jan 6, 2016 at 16:53

what I have noticed is that Workflow Copy/Paste is selective - never use it to copy logic constructs [for example, IF statements] as this will result in the above type of error. The only actions I have been able to copy successfully, multiple times, are Update and Log statements. The rest I'm forced to recreate manually. Alex

  • 1
    So, what Mark said? ;) Commented Sep 11, 2013 at 19:17
  • Yup, you got to be careful with it :-) And avoid copying from one workflow to another... It not only doesn't work, but it can sometimes crash SharePoint Designer 2013. It's one flaky tool... Caveat: Although we use SharePoint Designer 2013, we are still waiting for our full 2013 upgrade. So our workflows are 2010 based, so I don’t know if the same issue exists with 2013-based workflows
    – Alex
    Commented Sep 11, 2013 at 23:02
  • I had the same problem and it was due to the copy/paste. Commented Feb 12, 2014 at 17:17
  • I was getting an error - Activity 'ID976' validation warning: Activity 'ID500' may not be executed before activity 'ID976'. After reading this I remembered I had copied an IF construct in a Task completion conditions section of a 2010 workflow in SharePoint Online. Deleting all the IFs and rebuilding from scratch resolved the error. I have successfully copied plenty of actions before in other workflows, this is the first time I've had a failure (and i believe, copied an IF statement). No more "lazy" coding for me :) Commented Jun 8, 2016 at 12:54

Simply create another blank workflow and copy the content of the old workflow (the one with errors) and paste then content on the new workflow and try to publish it will work.

  • Just to piggy back off of this - I had a workflow with over 50 variables, so when I copied the steps over to another workflow, I saw the variables' internal names (e.g., Variables_x0020x_Name_x0020x_Here) so I remade the variables to match the original casing as best as I could and it worked. The workflow had way too many steps for me to recreate manually without messing something up, so I'd definitely say to try this first.
    – Dinerdo
    Commented Nov 5, 2014 at 14:32

I looked into my ProjectName.csproj file and noticed that my ClassActivity.rules was missing the DependentUpon tag.

Once I changed it from :

<EmbeddedResource Include="ProjectFolder\ClassActivity.rules" />


<EmbeddedResource Include="ProjectFolder\ClassActivity.rules">



I was receiving the similar errors and I didn't want to recreate the workflow from scratch. These steps worked for me. It clears the cache so whenever you reopen SharePoint Designer, you have to re-add your website.

  1. Close SharePoint Designer.
  2. Delete all folders in the following directory in local: C:\Users\USER\AppData\Roaming\Microsoft\SharePoint Designer\ProxyAssemblyCache\
  3. Delete the files in all folders in this directory in local: C:\Users\USER\AppData\Local\Microsoft\WebsiteCache\

I found this answer here: http://www.sharepoint-specialist.nu/sharepoint-designer-2013-error-unexpected-error-on-server-associating-the-workflow/


It is also due to two people using the same workflow and a person with an old version publishes. I had the issue where someone would publish a workflow and I would go back to it and see nothing, make the correction that the other person did and publish it again, giving the same error.

Best thing to do is, delete the workflows off the list, clear Designer's two cache files. Open Designer again and look for any differences in the last view you saw, just in case it's an old version.

Also, be aware that Designer needs a lot of ram and a fair internet speed. So if two people are working on it and one has less ram, most of the time the person with less ram will see the updated workflow slower and more likely to error out.


Rather than using a SharePoint 2010 workflow for these kinds of things, use a 2013 workflow if your programming allows for it. I had a workflow that sent out the same email depending on which department selected was in the list. I was able to copy and paste the if/then statements and emails containing workflow lookups with no errors using the 2013 workflow. Happy SharePointing!


This almost ALWAYS happens when I copy/paste an email action that is emailing "Created By" Never when I email a variable or hard-coded address. You know it is going to happen when you copy and it takes a minute to retrieve the information from the server and then your new action has and ID### in the To line rather than "Created By." When you open the email the To line will be blank. Deleting the actions will not prevent the error on publish and the worst part is that this error crashes IIS for me so I cannot publish any workflow until I reset. It's very frustrating.


This problem occurs when:

1) We copy paste some steps.

2) Not writing proper If else statement.

I correct the issue by writing the steps manually and correcting the If else statement.

and using below steps after that:

  1. Delete all folders in the following directory in local: C:\Users\USER\AppData\Roaming\Microsoft\SharePoint Designer\ProxyAssemblyCache\

  2. Delete the files in all folders in this directory in local: C:\Users\USER\AppData\Local\Microsoft\WebsiteCache\

If this issue occurs in any 1 workflow then it gives the same error for all workflows while publishing.

It occurs mostly because of use of approval process in workflows.


Mine was also cause by a copy paste, but my workflow is long and I didn't want to just recreate thing randomly.

My error was

Activity 'ID8985' validation failed: Cannot resolve Activity 'ID8973'

So I went to the All Files in designer and navigated to the workflows folder > my workflow > myWorkflowName.xoml.wfconfig.xml and opened it in notepad.

I searched for ID8985 and found it, a search ID8973 found no activity definition. So I looked at the activity for ID8985 and the activities around it and I was pretty sure what line in the workflow that activity corresponded to.

It was an email line (error was specifically setting the To field) I had copied. I deleted and recreated it. And still got the error. It was inside an if statement and seeing some people's comments above I tried creating a new if statement then cut and pasted the contents of the old if statement (including the email activity) into the new one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.