Recently, while attempting to publishing a SharePoint Designer workflow I was receiving the following error message:
“Errors were found when compiling the workflow.The workflow files were saved but cannot be run”.
Detail: “Unexpected error on server associating the workflow”
I researched the issue and found many suggestions and workarounds for this issue. Fixes and workarounds that worked for others range from Permissions configuration, configuring the correct task list, right through to code fixes. On some occasions the problem was purely a minor detail that had been overlooked by the developer.
Knowing that none of these fixes and workarounds applied to my scenario I was a little baffled to say the least.
What worked for me
A colleague of mine suggested using ProcessMonitor (opens in new window) to find out what was happening when attempting to publish the workflow. What we discovered is that each time I tried to publish the workflow, it was writing to and referencing a cache on the client machine (where SharePoint Designer is running).
Cache Location on Vista/Win2008:- C:\Users\[Username]\ApPData\Local\Microsoft\WebsiteCache
Note: If you happen to know where the cache is located on other operating systems I’d appreciate your input.
Having cleared out the cache the workflows published. Hurrah!