Scenario/Problem: You want to assign a workflow to a list or library so that users can select it from the list of available workflows, or you might want to define a workflow that starts automatically when a document or list item is added or modified in the library or list.
Solution: To attach different workflows to a list or library, you need the Manage List or Manage Library permission on that list or library. If you have those permissions, switch to the Library ribbon or List ribbon and click on the Workflows button (see Figure 1).
FIGURE 1 The Workflows button in the Library ribbon.
Clicking the Workflows button opens the Workflow Settings page for the list or library. This page enables you to associate a workflow with the list or library (see Figure 2).
FIGURE 2 The Workflow Settings page for adding a workflow or managing the existing ones.
The list of workflows that were already added to the list or library appears at the top of the page (under the Workflows title). The option to add a workflow is shown as a link at the bottom of the page. Click this link to open the Add a Workflow page, shown in Figure 3.
FIGURE 3 The Add a Workflow page.
In the Add a Workflow page, you can define what workflow you want to create on the list or library by selecting from the workflow box that lists the available workflows. By default, the only workflows available in SharePoint Server are the five built-in workflows:
Disposition Approval—Allows starting a workflow to manage document expiration and retention. As part of the workflow, people involved with the file or list item are required to decide whether to retain or delete expired documents.
Three-State—Tracks the progress of approval of a document or a list item through three states: Active, Ready for Review, and Complete.
Collect Feedback—Allows starting a review workflow for a document or list item in the list or library. Reviewers can provide feedback, which is compiled and sent to the owner of the file or list item when the workflow has completed.
Approval—Allows starting an approval workflow on the list’s or library’s items, where approvers can approve or reject the document or list item, reassign the approval task, or request changes to the document.
Collect Signatures—Allows starting a workflow for collecting signatures that are required to complete a business process on a document. Note that this workflow can be started only from within a Microsoft Word 2007 or Microsoft Excel 2007 client (or later versions), and then only from certain versions of Microsoft Office 2007 (Ultimate, Professional Plus, and Enterprise). If you cannot start this workflow from your Microsoft Office client, you should check the version of your Microsoft Office and upgrade if necessary.
In SPF, only the Three-State workflow is available by default.
After you choose a workflow, choose a name for it. Because more than one workflow of any type can be attached to the document library or list, each must have a unique name so that the users can recognize it in the list of workflows. For example, a document library might require two approval workflows: one for expense claims and one for travel expenses. To create those two, you need to add them both as approval workflows—but each one with a different name.
The next choice is what task list the workflow should use to create tasks associated with it.The Approval workflow creates tasks for approvers to approve the file or list item when the workflow starts. You can point each workflow to a specific task list or tell the workflow to create a new task list for itself.
The History List section enables you to define where the workflow reports its progress, for the purpose of storing the history.When viewing a workflow’s progress, you can see the history of steps taken in the workflow. Here, you can define in which list that history is kept. By default, the history is kept in a hidden list called Workflow History that the users do not ordinarily see. If you want to store the information in another list, you can define that here.
Finally, the last section of the page, Start Options, enables you to specify when the workflow starts (see Figure 4).
With the first option, Allow This Workflow to Be Manually Started, users can start the workflow manually. The third option, Start This Workflow When a New Item Is Created, causes the list or library to start the workflow automatically when a new item or file is added to the list or library. As you can see in Figure 4, if you choose to let the users start the workflow manually, the users must have the Edit Items permission on the list or library; otherwise, they can’t start the workflow on any item. Select the Require Manage Lists Permissions to Start the Workflow check box to allow only managers of the list to be able to start the workflow.
You can use the second option, Start This Workflow to Approve Publishing a Major Version of an Item, only if the list or library has versioning set to allow major and minor versions. If this option is selected, this workflow starts when a user submits a file or list item for approval to get published as a major version. The last option causes the workflow to start when an item or a file is changed in the list or library.
When you are finished configuring the workflow, click Next to open the workflow’s association form (if the workflow has one). A workflow association form is different for each workflow type and is used to configure settings that are specific for that workflow type (see Figure 5). For example, the Approval workflow’s association form enables you to set whether the approval is done in parallel or in a serial manner. Parallel approval means that all the approvers get an e-mail message at the same time, whereas serial approval means the first approver on the list must approve before the second one gets the request to approve, and so on.
FIGURE 5 The Approval workflow’s association form.
When you are done setting the configuration for the workflow, or if there are no additional configuration settings, click OK. If you selected that users can start the workflow automatically, your new workflow is added to the list of workflows the user can start.