3 Ways to create workflows for WSS 3.0 and Office SharePoint 2007
Learn how to choose between using out-of-the-box SharePoint workflows, creating codeless custom workflows in SharePoint Designer, and writing code to create custom workflows in Visual Studio for use in SharePoint.
Both in Windows SharePoint Server (WSS) 3.0 as Microsoft Office SharePoint Server (MOSS) 2007 you can either:
- Use out-of-the-box workflows, or
- Use SharePoint Designer 2007 to create custom workflows, or
- Use Visual Studio 2005 to create custom workflows
Each method has its own advantages and disadvantages.
Using out-of-the-box workflows
I've previously discussed the standard out-of-the box workflows that are available in WSS and in MOSS.
These workflows provide basic functionality to model common business processes, such as document approval. In addition, only one workflow, the Three-state workflow, comes with WSS 3.0, so your options to use out-of-the-box workflows in WSS 3.0 are very limited.
Typically, you will have more complex workflows that you'll want to model and create. In such cases you can use either SharePoint Designer or Visual Studio to design and create workflows.
Using SharePoint Designer to create workflows
SharePoint Designer is a good tool to design and create workflows if you do not have programming skills.
SharePoint Designer has a wizard you can use to add and customize the steps and actions for your custom workflow.
The disadvantages of using SharePoint Designer are:
- You can only associate a workflow with one list or library on one site. If you want to reuse a workflow across multiple sites, you will have to manually recreate the workflow for each list or library on each site you want to run the workflow on.
- You can only associate a workflow with a list or library, not a content type. This means that you cannot run workflows on individual document types with specific metadata.
- You cannot write custom executable code.
You can use Visual Studio to overcome the limitations of creating workflows in SharePoint Designer.
Using Visual Studio to create workflows
Visual Studio is an ideal tool to design and create workflows for more advanced scenarios. It offers total flexibility for developers to implement advanced functionality into collaborative business processes.
Compared to SharePoint Designer, the main advantages of Visual Studio are:
- You can create one workflow and associate it with many lists or libraries on many sites. Workflows can easily be activated and reused across multiple sites without having to recreate them.
- You can not only associate a workflow with a list or library, but also with a content type. This means that you can run workflows on individual document types with specific metadata.
- You can write custom executable code and custom workflow activities, and also respond to SharePoint events in your workflows.
The obvious disadvantage - if you can call it one - of Visual Studio is that you require advanced programming skills to be able to create custom workflows.
For a more complete comparison between SharePoint Designer and Visual Studio, see Workflow Development Tools Comparison.
Consider the out-of-the-box workflows first before moving onto custom workflow development. You may be able to fully model your business process with one of the out-of-the box workflows that come with WSS or MOSS and avoid any custom development.
If you require more complex workflows, you can use SharePoint Designer 2007 to create the workflows and avoid writing custom code in workflows.
If you require custom code in a workflow, want to reuse a workflow in several sites, or want to use a workflow with a content type, you must use Visual Studio 2005 to create the workflow.
- Visual Studio workflow: Copy a document from one SharePoint document library to another
- How to create custom Visual Studio 2005 workflows for WSS 3 or Office SharePoint Server 2007
- Adding a three-state workflow to a content type in SharePoint