Wednesday, May 13, 2015

Sharepoint Workflow running on Old Version after publishing

Observed a weird behavior in Sharepoint Designer workflows. We have Workflows designed on designer and being used in our application. There are multiple versions on it as we added new features time to time. Recently we added some more features and published to latest version. It updated to server and could see latest version in Workflows section of the corresponding List in website.

But, when we run the workflow, we observed that its of too old version, many latest features were missing.

After doing some online research, we realized that the problem is due to cache of workflow activities in the local machine where we implemented them using Designer.

Sometimes, SPD might be using the old DLL fro mthe cache than the updated one and thus we see old version running. To correct this issue, we need to clear the Cache and run the Designer and republish the workflow. And also, its better to disable option to cache site data in designer, to avoid similar problems in future. To do this, follow below steps.

  • If Sharepoint Designer is open, close it
  • Open My Computer and enter '%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache' in address bar
  • Delete files and other folders in this location
  • Now go to this location '%APPDATA%\Microsoft\Web Server Extensions\Cache' and delete all fiels and folders
This would solve the issue and now if you re publish the workflow, it would work fine.

To disable Site Data caching, follow below steps

  • Navigate to the "File" menu then select "Options" -> "General" -> "Application Options"
  • On the “General” tab, under the “General” heading, uncheck “Cache site data across SharePoint Designer sessions” 

No comments:

Post a Comment