in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

in·for·ma·tion /ˌɪnfərˈmeɪʃən/ [in-fer-mey-shuhn]

"Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information on it." -- Dr. Samuel Johnson [1709 - 1784]

"Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?" -- T. S. Eliot [1888 - 1965]

No options to save workflows as templates in SharePoint Designer!?

Yes, here it is, another shortsighted omission from MS....
It's not possible to create a workflow in SharePoint Designer and save it as a template to be re-used in multiple lists/libraries!
I mean, c'mon guys, how hard can that have been to implement !!??

And what does this mean for the end user??  Since a single SPD workflow can only be attached to a single list, you have to rebuild a workflow from scratch for every instance you wish to implement.
Even if there are only a few lists/libraries that require the same workflow, this means, for complicated workflows built in SPD, a LOT of manual effort & time running through the rules based logic. Not to mention, if there's an email notification involved, you can't copy & paste the mail content and keep any lookups.

And how often is it that you have multiple lists/libraries that require the same workflow?? I'd say pretty often. And it's not always convenient, necessary or possible to have the workflow built in Visual Studio and implemented as a feature.

Well, rant over (for now), there is a workaround (probably by accident rather than design).... it is possible to copy and paste workflows in SPD. And not only can this be done in the same site, it can be done across site collections & farms.

So, once you have created your first instance, you can simply copy & paste your 'template' to the root Workflows folder in the current (or any other) site. Then it's simply a case of following a couple of steps to ensure it's all going to run smoothly.

  1. Rename the new copy to identify which library it will be associated with.
  2. Open the new copy and you will be given the initial startpage of the workflow. Here you will see that the workflow isn't assigned to a list/library, so you can select a new list/library to assign it to.
  3. Step through to the next page where you can check/modify any existing conditions & actions if you require small changes per instance (Note: references to specific columns/fields will need to be checked. Of course, if you're implementing this procedure over many lists/libraries then the chances are that the lists/libraries are identical or have similar key columns/fields that are part of the workflow)
  4. Review any emails that will be generated by the workflow and reset any lookups that have been added to the body. These references will have been detached by the copy & paste. To fix this it's simply a case of selecting the lookup which will appear as a string like: [%{0B1B3F2F-D3DB-4F4B-8640-CA442C7E5B10}:%], then clicking on the 'Add Lookup to Body' button and clicking OK in the Define Workflow Lookup dialogue. This resets it to the current list/library.
  5. Click finish when everything is checked.

Of course, you can save a target list/library as a template, move it to your  local development environment and keep a copy of this workflow assigned to it by doing the exact same procedure.

It's not the most elegant solution, but until the SPD design team get their act together it'll have to do.

Comments

 

Paul Galvin said:

I totally sympathize.  I wish SPD workflow could be more easily moved around.

Just to add a small note -- SPD workflow can be added to a template in a site definition.  The "fab 40" templates do this.  So, it's possible.  Check out this link for some hints: forums.msdn.microsoft.com/.../543f4d7b-bcb4-4d25-9605-778d0e1c72c1

August 11, 2008 7:06 AM

Leave a Comment

(required )  
(optional )
(required )  
Add

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts