views:

1554

answers:

3

I've ran into this scenario a lot it seems. I'm not sure if it's an issue with SharePoint Designer, or SharePoint itself, but the following seems to occur often:

I create a Workflow in SharePoint Designer, and when I save it, it's good to go, and works as expected. However, when opening it later for edits in SPD, I can make changes to the workflow, very large ones, and save it, and on the SharePoint site, it shows as a new version of this workflow, but never reflects the new changes I made to it.

For instance, I created a simple one to test, simply an email gets sent to me when a new item is created in a list. Works fine. However, when I add an item lookup in the body of the email, save the workflow again, and create a new item in my list, I still get a blank email, not the new item lookup in the body of the email as expected.

Is there some kind of timer with SharePoint updating workflows? Am I missing something here?

A: 

Very strange. Have you tried removing the previous versions of the workflow from your list?

After you make an update to your workflow, remove the old instances. In your list or library:

  1. Click Settings
  2. Click Workflow Settings
  3. Click Remove a Workflow
  4. Select the radio button under the Remove column for every "Previous Version" item.

Be warned, I'm pretty sure that removing the old versions of the workflow will also remove the workflow history (if any) and any currently running older versions of the workflow will be removed as well.

Kit Menke
Yes I have done this, doesn't seem to help at all. Before I delete them, it looks as if there is no history for any of the previous versions, as well.Also, in looking around in this area, and the workflows are always marked as completed. I try to view the reports (_layouts/RunReport.aspx/Activity_Duration_Report.xml), and the error report (_layouts/RunReport.aspx/Cancellation__Error_Report.xml), and it always says "Error Report contains no data". It could be that my SharePoint installation is severely hosed up.
program247365
Maybe your SharePoint box needs an IISRESET. :)
Kit Menke
+2  A: 

Hello Program247365,

I've been having the exact same problem, only with a Visual Studio based workflow. So I swiped your subject line and ran over to the MSFT TechNet forums to ask. At the same time, I was flailing around trying to figure out what was going on myself.

Through trial and error (lots of error), I (with lots of help from my friends) eventually stumbled upon the fact that it is Visual Studio that is broken. Here is a link to the "known issue" when debugging workflows in Visual Studio.

connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=389923&wa=wsignin1.0 (Sorry, new user, only one link allowed!)

My forum post asking for help and the subsequent solution (which is over-zealous but it worked when I did that combination. I've since realized that there are simpler steps.)

TechNet Forum Post

I don't know if this will be the same for SPD but I hope this might help someone who encounters this problem in the future. My current workaround is:

  1. Shut Down Visual Studio
  2. Delete the files from the C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\VisualStudio\9.0\ProjectAssemblies
  3. Restart Visual Studio

You will need to do this every time you make modifications to the Workflow on the Workflow designer surface. VS 2008 "seems" to pick up and debug to the right location if you just add code, but if you find weirdness in the debugger with break points in code, repeat the above steps.

Dave White
+4  A: 

For SharePoint Designer, the solution is similar to Dave's solution.
It seems SharePoint Designer saves local copies of DLLs from your servers, and although everything seems OK, this prevents it from updating the workflow (this is when custom activities are involved, which the question didn't mention).

To solve this issue:

  1. Close SharePoint Designer
  2. Go to

    C:\Documents and Settings\%USER%\Local Settings\Application Data\Microsoft\WebSiteCache

  3. Delete either (choose one, based on how annoyed you are by now):

    1. All folders.
    2. The folder that "looks most like your site" (can be more that one: site, site(1), etc, and should be the bottom level site, not the root site)
    3. The relevant DLL on that folder.
  4. Start SharePoint Designer, save the workflow again, it should be ok.

Source: http://social.msdn.microsoft.com/forums/en-US/sharepointworkflow/thread/a4c77c18-e845-4121-9538-e76a44a82b88/:

Kobi
Awesome! This seems to have worked for me.
program247365