Wednesday, January 4, 2012

Sharepoint workflow changes missing

Recently I developed a Sharepoint designer workflow and it worked fine, now after few days i made small changes to it but it didn't apply the changes in the site collection.

1. Opening WF in SharePoint Designer shows all the new changes
2. Workflow was published without any errors
3. Tried creating new items and ran WF but still see the missing changes

After searching about this issue, I found some valuable information

If you are building a workflow activity on WSS/SharePoint Foundation for SPD you may have to update your activity DLL regularly (say to fix bugs or alter behaviors). Sometimes when you do this, SPD won't recognize your changes to the activity and instead appear to be using the 'old' DLL. Depending on what you've changed in the activity on the server, SPD may not allow you to use this activity at all. This is due to a mismatch between the server's activity and the SPD client's cached activity. To fix this problem its a good idea to clear your SPD activity cache whenever you update your activities DLL on the server.

To clear the SPD activity cache:

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. Once done publish to see the new changes.