Export (0) Print
Expand All

Use Workflow to Assemble Final Documents from Document Set Contents in SharePoint Server 2010 (ECM)

SharePoint 2010

Last modified: April 15, 2010

Applies to: SharePoint Server 2010

In this article
Customization Methods
DocumentSet Object Model Components
Conceptual Document Set Assembly Process
Workflow Process

In Microsoft SharePoint Designer 2010, users can associate and run workflows based on Microsoft SharePoint Server 2010 folders. Because document sets are an extension of the SPFolder object, users can associate and run workflows for them.

One of the most powerful new workflow functions supporting document sets is the ability to construct a process that operates against all the documents in the set to integrate them in a master deliverable. This topic includes example procedures that integrate a document set by using SharePoint Server 2010 workflow capabilities.

Two development tools are provided for authoring workflows for Microsoft SharePoint Foundation 2010: the Visual Studio 2010 Workflow Designer, and SharePoint Designer 2010. The most significant differences between the two tools are the following:

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

  • Workflow authoring in SharePoint Designer 2010 is usually done by someone other than a 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 the Safe Controls 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.

In addition to the pre-existing objects in the Microsoft.SharePoint.Workflow namespace and the Microsoft.Office.Workflow namespace, there are new classes and methods to support workflow requirements for a document set. In general, these classes were added to simplify the application of a task or multiple tasks against the entire document set.

Table 1. Classes and methods to support workflow requirements for a document set




A feature receiver that is used to install bulk workflow task editing capability in the workflow.


Used to create work item timer jobs that are used to update a collection of workflows.


An individual bulk workflow work item.

This information provides general guidance about the steps required to assemble a document set by using a workflow. Because it requires a code-behind implementation to assemble the document, Visual Studio is the best platform for the work.

  • Microsoft SharePoint Server 2010

  • Visual Studio 2010 Workflow Designer

  • Assembly Process Solution

When you develop workflows for Microsoft SharePoint Foundation 2010 or SharePoint Server 2010 by using the Visual Studio 2010 Workflow Designer, follow these basic steps:

  1. Author your workflow, including the code-beside file if needed, in the Visual Studio 2010 Workflow Designer.

  2. Design and publish any forms that you want to use with your workflow.

  3. Author the feature definition and workflow template definition file, which contains information about the workflow assembly, and binds the forms to the workflow assembly.

  4. Compile the workflow files into a Microsoft .NET assembly.

  5. Package the workflow assembly and workflow definition together and deploy them by using the features functionality in SharePoint Foundation 2010.

  6. Debug the live workflow assembly by using the Visual Studio 2010 Workflow Designer.

  7. Recompile and deploy the workflow assembly as necessary, to fix any bugs found.

In step 1, you create a workflow including all the actions performed by the user or the system. At the appropriate point in the workflow, such as following final approval, include an action and set its properties to reference your custom code to assemble the document set. Upon completion of the custom code, the workflow resumes.

© 2015 Microsoft