none
workflows when saving site as template with content RRS feed

  • Question

  • I have have a MOSS 2007 site on a production server with custom workflows.  I saved the site as a template with content and used the template to create a sibling site.  I am testing it and the workflows aren't working.  Is this to be expected? I have read that workflow don't work when saving between development and production, but I can't find anything that addresses both sites being on production. Will I need to recreate the custom workflows by hand? 
    Wednesday, August 25, 2010 10:27 PM

Answers

  • Hi,

     

    For your first question, when you create a site from a template, the workflow included in this site won’t work well.

    That’s because SPD workflow use the hardcode with list GUID’s.

     

    For your second question, it seems you can’t make any new workflow work well in new site?

    I never experienced this issue, I am afraid you need create new site, create new workflow and try again.

     

    Hope this helps

     

    Thanks!

    Stanfford

    • Marked as answer by Stanfford Liu Thursday, September 2, 2010 2:48 AM
    Monday, August 30, 2010 2:24 AM
    1. As Stanfford said, SPD workflows have hard-coded GUIDs instead of relative links.  However, the workflows are still there, and you can manually modify the config.xml file so that it has the proper GUIDs of your new lists (the workflow list, the task list, the history list, and the source list).  Try updating these GUIDs first to see if they'll work.  You can get the GUIDs by going to each list in the new site and viewing the URL while on the settings page - this URL shows the GUID
    2. If you don't even see the workflow status column show up, then the workflow hasn't even run yet.  This can be caused by being logged in as the System Account, by not checking in the item/document, or by not actually triggering it to start.

    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    • Marked as answer by Stanfford Liu Thursday, September 2, 2010 2:48 AM
    Monday, August 30, 2010 2:30 AM
  • I've always had pretty good luck with simple SPD workflows and saving a site as a template with content.  The key that I found was this:

    Before saving the site as a template, remove all workflows from the list using the web UI (_layouts/RemWrkfl.aspx).

    Then save the site as a template including content.  Even though your workflow isn't there, it will be included because behind the scenes it is there when the site gets saved.

    Create your new site using your template.  Examine the workflow on your list.  You will see that it is there.

     

    Again, I have only used this on simple SPD workflows, but it has seemed to work OK.

    -Xenox G.

    • Marked as answer by Stanfford Liu Thursday, September 2, 2010 2:49 AM
    Monday, August 30, 2010 2:58 AM

All replies

  • Assuming that the answer to my post above is that workflows as saved in a template will not work, I began to create a new workflow on the new site.  I made it very simple.  Set a value in a field and send an email.  But nothing is happening.  There is nothing in the workflow status column of the list and there is nothing on the workflow history page.  Can anyone advise me what to look for?

    I made this workflow to start on new items.

    Wednesday, August 25, 2010 11:14 PM
  • Hi,

     

    For your first question, when you create a site from a template, the workflow included in this site won’t work well.

    That’s because SPD workflow use the hardcode with list GUID’s.

     

    For your second question, it seems you can’t make any new workflow work well in new site?

    I never experienced this issue, I am afraid you need create new site, create new workflow and try again.

     

    Hope this helps

     

    Thanks!

    Stanfford

    • Marked as answer by Stanfford Liu Thursday, September 2, 2010 2:48 AM
    Monday, August 30, 2010 2:24 AM
    1. As Stanfford said, SPD workflows have hard-coded GUIDs instead of relative links.  However, the workflows are still there, and you can manually modify the config.xml file so that it has the proper GUIDs of your new lists (the workflow list, the task list, the history list, and the source list).  Try updating these GUIDs first to see if they'll work.  You can get the GUIDs by going to each list in the new site and viewing the URL while on the settings page - this URL shows the GUID
    2. If you don't even see the workflow status column show up, then the workflow hasn't even run yet.  This can be caused by being logged in as the System Account, by not checking in the item/document, or by not actually triggering it to start.

    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    • Marked as answer by Stanfford Liu Thursday, September 2, 2010 2:48 AM
    Monday, August 30, 2010 2:30 AM
  • I've always had pretty good luck with simple SPD workflows and saving a site as a template with content.  The key that I found was this:

    Before saving the site as a template, remove all workflows from the list using the web UI (_layouts/RemWrkfl.aspx).

    Then save the site as a template including content.  Even though your workflow isn't there, it will be included because behind the scenes it is there when the site gets saved.

    Create your new site using your template.  Examine the workflow on your list.  You will see that it is there.

     

    Again, I have only used this on simple SPD workflows, but it has seemed to work OK.

    -Xenox G.

    • Marked as answer by Stanfford Liu Thursday, September 2, 2010 2:49 AM
    Monday, August 30, 2010 2:58 AM
  • If you remove the workflow from a list, then it is not associated with that list and would not be visible when looking at that list's workflow settings.  What did you mean when you said "examine the workflow on your list"?  how can it be associated with a list if you removed it from that list?
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Monday, August 30, 2010 3:02 AM
  • If you remove the workflow from a list, then it is not associated with that list and would not be visible when looking at that list's workflow settings.  What did you mean when you said "examine the workflow on your list"?  how can it be associated with a list if you removed it from that list?
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force


    First create the workflow with SharePoint Designer and attach it to the appropriate list selecting the workflow start options appropriately.(i.e. Automatically start this worklfow when an item is created/automatically start this workflow whenever an item is changed / etc.)

    Use the Web User interface to go the workflow settings (WEBADDRESS/_layouts/WrkSetng.aspx?List={LISTGUID}) for the list you attached the workflow to and remove the workflow (when given the option of 'no new instances or Remove' make sure you choose 'Remove'.  Although you are removing it from the list using the UI, the workflow remains in the database and can be seen if you go into sharepoint designer.  just make sure you don't reopen and attach the workflow before saving the site as a template.

    Save the site as a template including content using the web user interface (WEBADDRESS/sitename/_layouts/savetmpl.aspx).

    Create a new site with this template to verify the workflow was saved.  Your workflow will be there in your newly created site and already attached to the list you originally specified.  

    When I said examine the workflow on your list, I just mean to take a look at the workflow settings the site you created from your template to verify that your workflow was recreated.

    - Xenox G.

     

    Monday, August 30, 2010 1:51 PM
  • You're saying that when the new site is created, the workflow automagically re-attaches itself to the list where it was removed?  I have never seen that - I'll have to test it.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Monday, August 30, 2010 2:04 PM
  • You're saying that when the new site is created, the workflow automagically re-attaches itself to the list where it was removed?  I have never seen that - I'll have to test it.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force


    'Automagically' is what I thought the first time I saw it work.

    To me it seems like since the workflow and association was created in SharePoint designer, the workflow exists on the site.  If you remove the workflow from the list using the UI, the workflow still exists and is saved with the template (if you include content).

    Give it a try and see if it works for you.  I haven't tried it with any complex workflows, but simple workflows with references to lists in the same site seem to translate well in the template.

    -Xenox G.

    Monday, August 30, 2010 3:24 PM
  • Could you please explain me the steps involved in updating the "config.xml" file, i am facing the same issue now :(
    Thursday, June 20, 2013 6:05 AM