Click here to Skip to main content
15,884,298 members
Articles / Programming Languages / C#

Reusable and Globally Reusable Workflows in SharePoint 2010

Rate me:
Please Sign up or sign in to vote.
4.75/5 (3 votes)
6 Apr 2010CPOL2 min read 78.1K   13   6
Using SharePoint Designer 2010 to create reusable workflows!

Introduction

"SharePoint Designer Workflows" is nothing new, we've had that in 2007 as well. In SPD 2007, workflows were not reusable. Once you have defined a workflow, you cannot move that workflow to another list or reuse it somewhere else.

NOW in SharePoint 2010, this is possible! You can create reusable workflows and attach them to more than one list.

"Reusable workflows" is one of the coolest features in SharePoint 2010, however when I opened up SPD for the first time, I was a bit confused because I noticed two different terms "Reusable Workflows" and 'Globally Reusable Workflows".

ResuableAndGloballyReusable

When you create a Reusable workflow in SharePoint Designer 2010, it’s by default reusable within the site it has been created in, which means that it can be attached to any list within this site. But what if you want your workflow to be reusable in the whole site collection? Well, this is the definition of “Globally Reusable Workflows”. You can easily convert your workflows to be available anywhere in your site collection by opening your workflow and clicking on “Convert to Globally Reusable” from the ribbon as shown below.

convert_to_globally_Resuable_wf

Warning

Also it’s worth mentioning that only the workflows created at the root level of the site collection can be converted to be Globally Reusable but other ones created in sub sites cannot. Try to create a workflow in a sub site, open it and note that the Conversion button is dimmed.

convert_to_globally_Resuable_wf_dimmed

Another important question is what if I want to take my workflow and give it to somebody else in a different site collection? There’s another button in the ribbon called “Save as Template”, this takes the workflow, put it in a wsp file and save it to the ‘Site Assets” library. You can export this file and deploy it to other site collection and what’s really cool is that you can import this wsp into Visual Studio and extend it over there.

SaveAsTemplate

VS2010

Very cool stuff! Thanks Microsoft for this feature!

History

  • 6th April, 2010: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
Egypt Egypt
Ayman El-Hattab is a Regional Technology Solution Professional focusing on helping software professionals and organizations build better SharePoint Solutions using Microsoft Application Lifecycle Management (ALM) technologies and tools. Ayman has been in this role since 2010 and has presented at many conferences all over the Middle East & Africa about ALM, SharePoint, C#, asp.net and Business Intelligence technologies. Ayman is also a Microsoft Most Valuable Professional [SharePoint MVP] , ALM Ranger, published author and an enthusiastic speaker who enjoys working with the online and offline developer communities all over the world. Ayman is the founder of MEA ALM Community & SharePoint4Arabs, community lead at Egypt SharePoint User Group and an organizer of several SharePoint Saturday events. Outside of work, Ayman can be found watching soccer games, playing xbox or watching documentary movies.

Comments and Discussions

 
QuestionAssociate workflows with Content Type? Pin
EagleUK25-Jul-13 2:59
EagleUK25-Jul-13 2:59 
Question'Save As Template' option not available Pin
su_penguin11-Sep-12 17:43
su_penguin11-Sep-12 17:43 
QuestionHow to create reusable state machine workflow? Pin
jmohanmurali10-Sep-12 19:26
jmohanmurali10-Sep-12 19:26 
GeneralNice post Pin
Member 472080510-Feb-12 15:30
Member 472080510-Feb-12 15:30 
QuestionConvert to Globally Reusable Option not Avaliable in SPD 2010 Pin
netasheesh11-Sep-11 21:03
netasheesh11-Sep-11 21:03 
GeneralGood Information Pin
Balaji_rcs13-Dec-10 21:35
professionalBalaji_rcs13-Dec-10 21:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.