none
Workflow won't update using sharepoint designer

    Question

  • Hi, Im using sharepoint designer 2007 to create a custom workflow.  For whatever reason, my workflow will not recognize the changes that I made.  I can make new workflow that work fine.  I have tried deleting my old workflow versions.  I have tried deleting my old versions in sharepoint designer.  The versioning history says that I have changed my workflow, but it does not behave differently.

    p.s. sorry my name is messed up.  made the account when i was in a hurry
    Tuesday, June 17, 2008 8:52 PM

Answers

  • http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3036275&SiteID=1

    Read the bottom post

    http://blogs.msdn.com/sharepointdesigner/archive/2007/03/27/tip-clearing-the-spd-workflow-assembly-cache.aspx


    If you are building a workflow activity on WSS 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.


    • Proposed as answer by mushroom panda Wednesday, August 27, 2008 3:27 AM
    • Marked as answer by Mike Walsh FIN Sunday, November 30, 2008 7:54 AM
    Wednesday, July 09, 2008 2:56 PM

All replies

  • I have exactly the same problem but with Visual Studio 2008! I've started to find that the latest version of the workflow I'm building isn't being deployed. Well some version is being deployed but it's not the one I'm working on. If a breakpoint gets hit then I can switch between the two tabs and visually compare the one thats running on sharepoint and being debugged with the one I supposedly just deployed. So far I've tried uninstalling the feature using sdsadm and manually performing iisresets between deploys but the only "solution" is to restart the machine every time I want to test a change I've made. I would really like to find the cause of this.
    Wednesday, July 09, 2008 11:31 AM
  • Supposedly my problem, if it's the same is a known issue even thou I can find no record of it. Apparently the newest version is what's running but when I hit breakpoints in the designer I see an old version in the form of a xoml file. So in otherwords break in code and not in the designer and ignore the problem.

    If you are having issues with missing functionality that you've added then perhap's it's another problem altogether.
    Wednesday, July 09, 2008 2:33 PM
  • http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3036275&SiteID=1

    Read the bottom post

    http://blogs.msdn.com/sharepointdesigner/archive/2007/03/27/tip-clearing-the-spd-workflow-assembly-cache.aspx


    If you are building a workflow activity on WSS 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.


    • Proposed as answer by mushroom panda Wednesday, August 27, 2008 3:27 AM
    • Marked as answer by Mike Walsh FIN Sunday, November 30, 2008 7:54 AM
    Wednesday, July 09, 2008 2:56 PM
  • Thanks for this post Luke.

    Came across the exact problem today and luckily enough to fix it up before it started causing a whole heap of problems.

    What can I say about SPD custom workflows.... *sigh*
    Wednesday, August 27, 2008 2:11 AM
  • Hi All,
    I too faced similar problem, what i did is following:
    1. Created an activity library. say v 4.1
    2. deployed it and created my workflow using SPD and attached them to a list.
    3. all workflows were executing successfully.
    4. then i upgraded my activity library and inc its version to 4.2
    5. and then i replaced old 4.1 with this new version 4.2
    6. done IIS reset, windows service restart as well.

    My workflows failed to start :(

    7. I even tried updating the version of my workflow .xoml file programmatically from 4.1 to 4.2, but even that didnt help.

    8. then i opened my workflow in designer (after above step) and clicked on finish, the workflows in list were then executed properly!!!

    can anyone please suggest how can i automate this process of upgrading activity assembly version without user intervension.

    regards,
    jay
    • Edited by Jay_Chauhan Monday, October 13, 2008 12:06 PM
    Monday, October 13, 2008 12:04 PM
  • Hello

    I have the same problem with SPD. I have developed my own Workflow Activities and I have edited the Xoml file to include them in my Workflow but when I save them the association of the list continues to the lastest version of the workflow that SPD attached. So, there is a step that we are missing after saving the file. I read somewhere that WebPartPages web service has the methods to validate the workflow and generate supporting objects in method ValidateWorkflowMarkupAndCreateSupportObjects and, after that, using the method AssociateWorkflowMarkup, the workflow will be associated to the list again. But I don't know how to use those methods, there is no help about them on msdn or somewhere else.
    Friday, November 21, 2008 8:39 AM
  • Hi lemeridas,
    Thanks for the reply. I too couldnt find anything on this and this is proving to be pain in the back. I will check if I can find something more on this. If you or anyone else come across any solution related to this please do post here.

    Regards,
    Jay
    Saturday, November 29, 2008 11:25 PM
  • Hi There,
    I was just browsing and found the below link and it seems this may solve our purpose. This tells how to validate and re-attach the workflow with the list to make it work.

    http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/698fd356-cc85-4831-a385-478d825d4baf/

    I will try this out hope this will work :) .. best of luck to you ..

    Regards,
    Jay

    Saturday, November 29, 2008 11:30 PM
  • Hi Jay_Chauhan

       I've also done my own achievements and I discovered some things. My application must be running under SharePoint environment, otherwise, AddWorkflowMarkup method will thrown a SoapServer exception (I don't know how SharePoint designer associates the workflow to avoid this exception). As you could look in the other thread, to ValidateWorkflowMarkupAndCreateSupportObject you must send the Xoml and the xml configuration file. The method will return the Guid of the Workflow task list. The next step is to call AssociateWorkflowMarkup with the url of configuration file and the version of the xoml file to attach. This method for me does not launch any exception, but i'm not able to launch the Workflow. When I launch the Workflow an exception is thrown by the Workflow runtime that is logged in the SharePoint logs (Sorry about the exception message but the framework language is Spanish), It says that the xml data is invalid at line 1, position 1, I think is something about the InitiationData of the workflow.

       RunWorkflow: System.Xml.XmlException: Los datos del nivel de raíz no son válidos. Línea 1, posición 1.     en System.Xml.XmlTextReaderImpl.Throw(Exception e)     en System.Xml.XmlTextReaderImpl.Throw(String res, String arg)     en System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()     en System.Xml.XmlTextReaderImpl.ParseDocumentContent()     en System.Xml.XmlTextReaderImpl.Read()     en System.Xml.XmlTextReader.Read()     en System.Xml.XmlReader.MoveToContent()     en Microsoft.SharePoint.Workflow.SPNoCodeXomlCompiler.CompileBytes(Byte[] xomlBytes, Byte[] rulesBytes, Boolean doTestCompilation, String assemblyName, SPWeb web)     en Microsoft.SharePoint.Workflow.SPNoCodeXomlCompiler.LoadXomlAssembly(String assmNameIn, SPWeb web)     en Microsoft.SharePoint.Workflow.SPWinOeHostServices...    

       Looking carefully to SharePoint designer, it calls also a method from WebPartPagesService that is called GetDataFromDataSourceControl but the information about that method is less than WebPartPagesService. But later than that, uploads the aspx initiation form (I don't know how to make the initiation form), and calls GetListContentTypes method from Lists.asmx. I'm blind right now with this thing. All the examples that I found on the net does not say anything about these two methods, but Designer always call them.

    Sorry for my bad explanation but English is not my language :P
    Monday, December 01, 2008 11:04 AM