none
Why do sharepoint workflows, when edited, seem not to update on the SharePoint site?

    Question

  • I am developing a SharePoint 2007 Sequential Workflow using Visual Studio 2008.  I have all of this running in a Windows 2003 R2 Server (32bit) Virutal Machine.  This virtual machine has MOSS 2007 Enterprise installed, but I've turn off all of the MOSS features such that I have a WSS 3.0 environment as per my client's production environment.

    My problem is that when I build and deploy a workflow (all using the automatic asssociation provided by VS 2008) the workflow will run, but when I make edits to the workflow (add tasks for example), the new "version" of the workflow does not seem to be getting deployed to SharePoint.  When I run VS 2008 in debug mode, everything seems to work but when I step into the workflow to debug it, I step into a "previous version" of the workflow and I get a temporary .xoml file in VS  2008 that doesn't represent the current form of the workflow designer surface. (C:\Documents and Settings\Administrator\Local Settings\Temp\Live.Workflow.tmp1BFA.xoml vs. C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\...\RequestForQuoteWorkflow.cs)

    If I wipe out the web application and start completely fresh, I can run the workflow in it's present state, but as soon as I make edits, I'm stuck with the "previous version" of the workflow.  Wiping out the web application every time I make an edit to the workflow though is not a feasible work-around.

    Any help would be appreciated.





    Dave White
    • Moved by Mike Walsh FIN Tuesday, August 11, 2009 5:31 PM wf q (From:SharePoint - Development and Programming)
    Tuesday, August 11, 2009 5:05 PM

Answers

  • Hi,

     

    Based on your description, you came across a know issue of Visual Studio workflow.

    The debugger didn’t corresponding to the newer version of the workflow.

     

    The workaround I can provide to you is that restart the Visual Studio before debugging a newer version of xoml workflow.

     

    Because the issue happened in Visual Studio workflow debugging feature, so we didn't have any workaround in the SharePoint side.

     

    Here is the status of the issue for your information:

    https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=389923&wa=wsignin1.0

     

    Thanks for your understanding.

    -lambert


    Sincerely,
    Lambert Qin | Microsoft TechNet Managed Forum Support
    Posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, August 12, 2009 2:51 AM

All replies

  • could you verify that the new generated (workflow) dll has correctly been deployed to the Gac ?
    Serge Luca; blog: http://www.redwood.be
    Tuesday, August 11, 2009 5:23 PM
  • All Workflow questions go (only) to the Workflow forum.

    Moving this.

    WSS FAQ sites: http://wssv2faq.mindsharp.com and http://wssv3faq.mindsharp.com
    Total list of WSS 3.0 / MOSS 2007 Books (including foreign language) http://wssv3faq.mindsharp.com/Lists/v3%20WSS%20FAQ/V%20Books.aspx
    Tuesday, August 11, 2009 5:31 PM
  • could you verify that the new generated (workflow) dll has correctly been deployed to the Gac ?
    Serge Luca; blog: http://www.redwood.be

    Hello Serge,

    Thanks for the response.  I have been deleting the assembly from the GAC and verifying the VS 2008 is deploying the new assembly into the GAC.  I haven't looked at the assembly in the GAC (yet) to verify that the right code is in it. 

    I deleted the assembly from the GAC after you're suggestion and watched VS 2008 re-deploy the assembly, and then I ran the workflow and I now have a new .xoml file being brought up in the debugger. (C:\Documents and Settings\Administrator\Local Settings\Temp\Live.Workflow.tmp1C43.xoml).  I can not step into any of the workflow activities that are on the designer surface.

    Cheers,
    Dave

    Dave White
    Tuesday, August 11, 2009 5:42 PM
  • I've also just verified that the new assembly in the GAC has the new functionality I added vs. the "previous" version.  I watched VS 2008 copy the assembly into the GAC, then I retrieved the assembly from the GAC and use Reflector to look at the insides and found my new functionality.

    Does SharePoint (or IIS?) have a cached version of the assembly somewhere?

    Cheers,
    Dave

    Dave White
    Tuesday, August 11, 2009 6:01 PM
  • Does SharePoint (or IIS?) have a cached version of the assembly somewhere?

    Not as far as I know and if the application pool has been restarted (the VS2008 deployment does an IIS reset->ok)the new dll should be loaded.

    1°Does that work when you attach the project to the w3wp.exe process ?
    2°could you delete the existing workflow association and create a new one ?

    Serge Luca; blog: http://www.redwood.be
    Tuesday, August 11, 2009 6:38 PM
  • Does SharePoint (or IIS?) have a cached version of the assembly somewhere?

    Not as far as I know and if the application pool has been restarted (the VS2008 deployment does an IIS reset->ok)the new dll should be loaded.

    1°Does that work when you attach the project to the w3wp.exe process ?
    2°could you delete the existing workflow association and create a new one ?

    Serge Luca; blog: http://www.redwood.be

    1. Attaching to the w3wp.exe process that is already running does not change the situation.  I'm still looking at a .xoml file that seems to be out of date.
    2. I've created a second workflow and attached it to the same document repository with the same effect of having the .xoml file that seems to be out of date (after adding/moving activities in the designer).

    I just added a generic "CreateTask" activity to a branch of my workflow and had it create a task and then emit a string using Debug.WriteLine() and the new task did NOT show up in the .xoml but the new Debug.WriteLine() DID show up in the console.

    So it seems as if the new assembly is in place and working, but Visual Studio can't properly debug the workflow on the designer surface because it is bringing up an old version of the workflow in a .xoml file.

    This is very annoying.
    Dave White
    Tuesday, August 11, 2009 7:16 PM
  • very annoying indeed ! Just looking for a workaround : do you really need to generate workflows with code separation (with xoml); what I you create code only workflows ?
    Serge Luca; blog: http://www.redwood.be
    Tuesday, August 11, 2009 7:24 PM
  • very annoying indeed ! Just looking for a workaround : do you really need to generate workflows with code separation (with xoml); what I you create code only workflows ?
    Serge Luca; blog: http://www.redwood.be

    The way that my Visual Studio is setup currently, there is only one Project Template for SharePoint Sequential Workflow projects.  There is no need for there to be any code separation within the project.  Everything is in C# code.

    Throughout the afternoon, in my efforts to make VS play nice, I've found that the following steps SEEMS to reset the designer such that my breakpoints and stepping through the workflow is in sync with the "current" version of the workflow:

    1) Save the project. Close VS 2008.
    2) NET STOP "World Wide Web Publishing Service"
    3) Navigate to "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root" and delete all ASP.NET Temporary Files
    4) Navigate to "C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\VisualStudio\9.0\ProjectAssemblies" and delete all VS 2008 Project Assemblies
    5) NET START "World Wide Web Publishing Service"
    6) Start VS 2008 -> Load Solution
    7) Debug workflow

    That is a big pain in the butt to have to go through to make sure that the designer when debugging is in sync with the designer when coding.

    Now I can start trying to fix the problem that I was trying to debug in the first place. 

    I'm sure I'll be back.

    Thanks for your thoughts and insights.

    Cheers,
    Dave

    Dave White
    Tuesday, August 11, 2009 11:00 PM
  • Hi,

     

    Based on your description, you came across a know issue of Visual Studio workflow.

    The debugger didn’t corresponding to the newer version of the workflow.

     

    The workaround I can provide to you is that restart the Visual Studio before debugging a newer version of xoml workflow.

     

    Because the issue happened in Visual Studio workflow debugging feature, so we didn't have any workaround in the SharePoint side.

     

    Here is the status of the issue for your information:

    https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=389923&wa=wsignin1.0

     

    Thanks for your understanding.

    -lambert


    Sincerely,
    Lambert Qin | Microsoft TechNet Managed Forum Support
    Posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, August 12, 2009 2:51 AM