SharePoint Designer 2007—Reusable SharePoint Designer Workflows

Ever had two processes in separate sites that could have used the same or very similar workflows, but you’ve used SharePoint designer workflows?  And of course, as everyone knows, SPD workflows aren’t reusable, right?  Wrong.  Well, it’s not as slick as you might want it to be, and it’s not reusable in the same sense that Visual Studio Workflows are reusable—but it is possible to re-use SPD workflows with a little wiring-up work.  That, of course, is opposed to the alternative of completely rebuilding your SPD workflow from scratch for another site or list.

So, what do you do?  I’ve broken it down into three basic steps that I’ll mention here and then explain in more detail:

  1. Export your workflow as a Personal Web Package, giving it a unique name.
  2. Import it into your other site.
  3. Wire-up the workflow for your new list.

Exporting your Personal Web Package

  1. In SharePoint Designer, Go to File > Export > Personal Web Package
  2. In the “Files in Web Site” column, drill down to the workflow(s) that you want to export.
  3. Highlight your workflow and click Add.
     
  4. Once your workflow appears in the “Files in Package” column Click OK.
  5. Now the save file dialog will appear for you to choose the name and save location for your Web Package.  This saves your package as a .fwp file.

Importing your Personal Web Package

  1. Open your new site in SharePoint Designer
  2. Go to File > Import > Personal Web Package.  This will open up the dialog to navigate to where you saved your web package.
       
  3. Choose your desired web package and click Open.  This will display the following dialog.  You can drill down through your web package and pick and choose which elements that you want to import.
  4. Click Browse to choose the location in the site that you want to import the web package into, and Click OK.
  5. Click Import on the Import Web Package window.
  6. You may see the following window.  If you trust your own web package click Run. 🙂
  7. Your workflow should now be imported.

Wiring-up the Workflow

Now that you’ve imported your workflow all you have to do is:

  1. Open the xoml file.
  2. Choose your list and start-up options.
       
  3. Then go through the workflow and wire-up all of the steps back to the appropriate fields in the new list.  All the logic will still be there, so all you have to do is pick the new fields.

    In many cases you will see circumstances where the fields have not been chosen:
       

    In other cases you will find GUIDS followed by a colon.  These are normally “ListName:Field” in the original workflow.  Here you will simply be choosing the list name and field for the new list.  You will often find that, after clicking on the GUID, the pop-up window that is displayed will reveal the original list and field.  If you simply click “OK” form here you will be set, or you can choose a new list and field.
        

  4. Fortunately, in my testing it seems to me that every time I import one of these workflows on a new site that it automatically replaces the old GUID values in the xoml.wfconfig.xml to the new GUID values.  However, I strongly suggest that you double check this, as well as GUIDs that may be on any custom pages that you generated for a workflow.  If the GUIDs don’t match up to your new lists’ GUIDs, then you will need to replace them here:

To find your list’s GUID you can get it from the URL of your list’s settings page.  For more info check out Step 4 on This MSDN Blog Post.  You may find a few caveats while working with this process that I have missed.  If so, then please feel free to share them.  Thanks!

Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: