SharePoint 2007 (MOSS) utilizes the Workflow Foundation (WF) to enable workflows on lists and content types. But before you start doing cartwheels there are few things you should know before you get started. The experiences I’ll be discussing are not from book smarts but from building real MOSS solutions that are in production today.
What You Can Tie Workflows To
There are two things you can tie workflows to: lists and content types. However it’s started and regardless of workflow type, a workflow needs to be anchored to an item within a list. All of the current tools within the MOSS web interfaces and SharePoint Designer are “tuned” for deploying workflows to lists, but not content types. There’s additional legwork to deploy workflows to content types.
A word on content types because they are important to understand. Think of what you do to a document in a document library. You give it metadata. All documents within that document library are all similar in that they have the same metadata. This is what we’re used to from SharePoint 2003 and what I see most people still doing in MOSS. Documents like this have no context when they are removed from their document library. But what if we could give them context regardless of what document library they are allowed to live in? This is what content types are for – giving your documents a context regardless of what document library they live in. Regardless of where the document lives, the workflows bound to the respective content type will be invoked.
Three Different Types of Workflows
When talking to our customers I tell them there are three different types of workflows: out of the box, SharePoint Designer, and custom.
Out of the Box
Out of the box workflows are baked into MOSS when it’s installed. When workflow is enabled, you will automatically see them off the MOSS list menu:

Figure 1. Manually starting a workflow.
And what follows are all the available workflows for the list item selected.

Figure 2. MOSS page showing workflows that can me manually started on the respective list, running workflows, and workflow history.
When you install your own workflows, you will also see them in this context. In publishing type portals, the approval workflows are started automatically. However, all of these workflows shown above are standard manually. Because you cannot control the sophistication of your users, manual workflow initiation should be discouraged as you want to insure your workflows will be started.
The out of the box workflows also have integrated web pages that end users will use when workflows are started.

Figure 3. Cool custom page that comes out of the box tied to the approval workflow that can’t be easily created for custom workflows.
Advanced pages such as this are not easily created for other types of workflows, so be careful to manage your expectation on how rich the user interface experience will be when initiating workflows. This was a mistake we made long ago before we cracked open SharePoint Designer.
SharePoint Designer
SharePoint Designer workflows are those that are created with SharePoint Designer. You will be spending the majority of your time here. Spend a fair amount of time exploring your options in the user interfaces, including how to lookup items in related lists. This is important so you can manage expectations of those creating requirements for you on what you can and cannot do with these types of workflows.

Figure 4. SharePoint Designer’s slick and simple workflow creation tool.
Deployment is a breeze with SharePoint Designer. After deploying a new workflow to a list, it is accessible to others to modify when they use SharePoint Designer. If the workflow has been allowed to start automatically, then it’s accessible with the out of the box workflows.
Custom
Your last resort is building custom workflows with the WF tools in Visual Studio. All the power comes with a price – you need to know WF and the MOSS object model in order to be effective writing custom workflows. Expect a length ramp up time. Also, the deployment story around custom workflows is currently very weak. There are several manual steps to perform in order to deploy custom workflows.
The SharePoint Designer workflows are intended not to solve a wide range of problems, but to go deep quickly on a narrow set. It’s easy to cross over out of this narrow set and find yourself commiting to custom workflow creation, so understand well what you can do with SharePoint Designer workflows before setting expectations. In order to control costs, we actively work to re-shape our customer’s requirements to maximize MOSS’s features. However, we often find ourselves extending MOSS with custom workflows and webparts.
The Ways Workflow Get Started
A workflow can be initiated in one of three ways, or any combination of the below:
· Manually
· When a new list item is added
· When a new list item is updated

Figure 5. Different ways that workflows can be started.
Manually started workflows are initiated by a user and on a specific list item. In all the solutions we have built on MOSS, we have never relied on this feature because we needed to guarantee that the workflow was executed.
Typically you will fire off your workflows with some combination of add new item and update item. Ultimately it will depend on what you are trying to accomplish with the workflow. The conditions that you place in the workflow will determine how far the workflow will execute.
You can end up with several workflows on a list that always get fired off when a list item changes, but because of the conditions setup within each workflow how far and long each workflow executes will vary.
SharePoint Designer
We receive many questions on the true purpose of SharePoint Designer, and typically the first comment from the developer community is that “this is not a developer tool”. And they are right. It’s not intended to fill that space. The types of people that we engage with this tool are specialists on the MOSS platform, HTML/CSS designers, and Business Analysts. It is the Business Analysts, with a little training, who can become almost immediately effective in creating and modifying workflows.
Workflow Deployment
Deployment of custom workflows is not for the faint of heart. It’s a lengthy multi-step process with no wizards provided. It is a completely different and positive experience with SharePoint Designer which is entirely encapsulated with wizards.
Workflow Permissions
In MOSS we now have list item level permission. In the applications we create on MOSS, we often have requirements to manage permissions at this row level. For maintenance and administration, “programmatic” assignment of row level permissions is almost always preferred.
When using workflows with multiple participants, each participant can have a different level of access not only to records but to entire lists. When a workflow is initiated, it runs under the permissions context of the user that started the workflow. In order to guarantee the proper operation of your workflow regardless of the participants, you may need to run your workflow with elevated permissions. This is something that can only be done with custom workflows.
Task Centric
In this context, a task is something you will find in an MOSS workflow task list. When a participant is required to interact with a workflow, MOSS gives the participant a task assigned to them. The participant sees the task, and click on a link to the associated list item. Once the task is marked as completed, the workflow resumes execution.
Because of the permissions context of a running workflow, one cannot lock down the Task list so that only you can edit your own entries. All tasks that are generated by a workflow, regardless of who they are assigned to, are owned by the person who started the workflow. The side effect of this is that everyone requires contributor access to the entire Task list. Otherwise participants downstream in the workflow that are assigned tasks will not be able to view them because the originator of the workflow owns the task.
Building Custom Activities
As you work more with SharePoint Designer and with the out of the box activities, you will begin to wonder how one would create your own activities that others in your organization can use in their workflows. This is where the true power would come in – to be able to wrap your own custom logic into a re-usable activity within SharePoint Designer. This is the perfect separation between developer and Information Worker.
Unfortunately, this is not yet supported. When MOSS Beta 2 was released, we actually make this work but it was painful. Once the TR was released, none of our custom activities would work. When speaking to Microsoft about this, there were no concrete plans to ship Visual Studio designers in the short term to manage custom activity creation and deployment.