Compartilhar via


Workflow Development for SharePoint Foundation

Applies to: SharePoint Foundation 2010

While Microsoft SharePoint Foundation 2010 includes workflow templates, you can also create your own workflow templates. You can use either Visual Studio 2010 Workflow Designer, or a declarative rules-based, code-free workflow editor, such as Microsoft SharePoint Designer 2010. Because each authoring tool produces workflows with different attributes and capabilities, it is worth examining each tool in detail.

Using the Visual Studio Designer for Windows Workflow Foundation

In Visual Studio, you can use the Visual Studio 2010 Workflow Designer to create workflow templates and custom workflow activities. You can include code in your workflow, as well as design forms to be used by the workflow to communicate with the workflow users during association and runtime. It is worth noting that when you are developing workflows templates in the Visual Studio 2010 Workflow Designer, you are not programming against a specific SharePoint site.

Using SharePoint Designer

By contrast, when you are creating a workflow in a declarative rules-based, code-free workflow editor, such as SharePoint Designer 2010, you are designing a workflow for the specific SharePoint Foundation site in which you are working. SharePoint Designer provides a user interface that enables you to create declarative rules-based workflows for the selected site. With SharePoint Designer 2010, you are in effect assembling preexisting activities into workflows.

You cannot create your own activities in SharePoint Designer; nor can you write code-behind files. Using SharePoint Designer, you create and deploy XML-based markup files, rather than an assembly that contains code.

Comparing Workflow Development Processes

In general, the largest difference between the two tools is this:

  • Workflow authoring in the Visual Studio 2010 Workflow Designer is performed by a professional developer, who is creating a workflow template that can be deployed across multiple sites, and which contains custom code and activities. The developer then turns the workflow template over to a server administrator for actual deployment and association.

  • Workflow authoring in SharePoint Designer is likely done by someone other than a professional developer, such as a web designer or knowledge worker who wants to create a workflow for a specific list or document library. In this case, the designer is limited to the workflow activities on their ‘safe list’, and the workflow cannot include custom code. The workflow author deploys the workflow template directly to the list or document library as part of the workflow authoring process.

Although the steps in the workflow creation process are specified by role and application, obviously the same person can perform more than one function, based on your business processes. For example, the same person might develop the workflow in Visual Studio and install it on the server by using SharePoint Foundation 2010.

For a more detailed comparison of the capabilities and advantages of each tool, see Workflow Development Tools Comparison.

See Also

Concepts

Workflow Development for SharePoint Foundation

Visual Studio Designer for Windows Workflow Foundation Overview

Workflow Development in Visual Studio

Workflow Development in SharePoint Designer