Tuesday, 7 August 2012

SharePoint designer workflow not updated

Today, I ran into another big SharePoint mystery (if you like mysteries, join the SharePoint world ;) ). A couple of weeks ago, I wrote a workflow in SharePoint designer (SPD) on a SharePoint Foundation environment. So far, so good.
Today, I had to update/fix the workflow because I forgot a little step. And guess what, it didn't work. The updates on the workflow were not applied. Although a new version of the workflow was present on the site, the changed were not. Rebooting the entire SharePoint machine didn't solve this. Arghhhhhh..... But lucky me, after some search, I noticed that I was not the only one...
It seems that SPD (sometimes = randomly I guess) forgot to empty his own application cache. A republish of a workflow is then done with the cached (=old) info. This is due to a mismatch between the server's activity and the SPD client's cached activity. So:
  1. Close SPD.
  2. Open “My Computer”.
  3. Go to %System Drive%\Documents and Settings\%user%\Local Settings\Application Data\Microsoft\WebSiteCache (If you are running Vista, that path is different - look for %System Drive%\Users\%user%\AppData\Local\Microsoft\WebSiteCache).
  4. Go to a directory that looks similar to the name of the website you were connecting to. (Alternatively, you can just delete all these directories and everything should work when you boot SPD).
  5. Delete the assembly with the name similar to the one you are changing.
  6. Boot SPD.
  7. You can now work with your updated activity.
Good luck and have fun!

No comments: