File repositories are like weeds–they grow fast, are difficult to control and can choke the life out of everything around them. It’s easy to wish the weeds of your SharePoint environment didn’t exist, but let’s be realistic: People love creating documents, and SharePoint stores documents. This means that file repositories are a part of your SharePoint future (whether you like it or not).
Not all file repositories are bad, though. Well-organized document libraries that make use of content types, metadata tagging, customized views and information policies do exist. The problem is, these well-managed document libraries don’t get much press. So let’s take a look at a solution you can implement to build a content review/retrieval strategy for your document library. It uses information management policies and workflows to send automated reminder (aka nuisance) emails to document owners once a document review/expiration date is reached.
The ABC Company uses a SharePoint document library to store all of our help desk support documents. When one of our help desk support representatives resolves a new (previously undocumented) issue, we create and upload a new support document. Since we want support documents to be reviewed regularly to ensure they remain current, we’ve added a required Date for Review field to our document library. Now when support reps upload a document, they’re prompted to specify a date when the document should be reviewed. The tricky part is enforcing the review date. We want SharePoint to automatically email the document’s creator when the review date is reached, advising the author that they should review their support document and either delete it or reset its Date for Review.
We’ll be using an out-of-the-box information management policy and a SharePoint workflow to build out this solution. The information management policy controls the timing of your solution. It watches the clock and fires off a SharePoint workflow when the Date for Review is reached. The SharePoint workflow is responsible for sending the review notification emails to your document creators. You have two options for creating this review notification workflow–you can use an out-of-the-box SharePoint workflow (a built-in SharePoint workflow that provides limited configuration options) or a custom SharePoint Designer workflow that you build to your specifications. There are pros and cons for using either approach:
Out-of-the-box SharePoint workflow advantages:
- Can be set up/configured within the SharePoint web interface
- Only requires admin privileges for your document library–not site admin privileges
Out-of-the-box SharePoint workflow disadvantages:
- Pre-configured workflows are fairly limiting. You take what is offered, with little ability to customize
SharePoint Designer workflow advantages:
- Enables you to customize who your email is sent to
- Enables you to dictate the verbiage that goes in your email
- Enables you to tailor your workflow to run under specific conditions
- Enables you to take a wide variety of actions, from sending emails and updating document metadata fields to performing calculations and logging workflow history messages
SharePoint Designer workflow disadvantages:
- Requires knowledge and use of SharePoint Designer, which is not available to all power users or site collection administrators
- Requires site owner permissions
Choosing which type of SharePoint workflow to use requires 2 key elements–an understanding of each workflow’s options and a thorough list of your own workflow requirements. To see the options that come with SharePoint’s out-of-the-box workflows, go to your document library and select Settings > Document Library Settings > Workflow Settings.
Since our scenario requires an automated review email notification email with custom verbiage, we’re going to proceed with creating a SharePoint Designer custom workflow.
Phase 1: Set up your document library
- Go to the document library you want to update with an automated expiration and email review process. (If the document library doesn’t exist yet, create it.)
- Create your Date for Review column. If you want to make sure this column is always populated, make sure you set it to be required.
I’m often asked if you can automatically calculate a review date (as opposed to populating one manually). You can, but SharePoint doesn’t make it easy. The fastest way to calculate a review date is to create a new Calculated column that automatically adds or subtracts days from one of your existing date fields. Unfortunately, information management policies can’t “see” calculated columns, and thus can’t use them to kick off your automated email reminder workflow. Your next-best option is to create a Date/Time column and build a custom SharePoint Designer workflow that performs your date calculation and populates your new Date/Time column. Not ideal, but it’ll get the job done.
Part 2: Building your SharePoint Designer workflow
Go to your document library. Click on the Library sub-tab, click on the Workflow Settings dropdown and select Create a workflow in SharePoint Designer.SharePoint Designer should open up, enabling you to start building your workflow. If SharePoint Designer doesn’t open automatically, don’t worry. Just open up SharePoint Designer 2010 manually, open your site, click on the List Workflow button and select your document library.
- When the following dialog box appears, specify a name and description for your workflow:
- Click OK to save your changes.
Now it’s time to set up your workflow. Fortunately, our workflow needs are fairly simple. As we mentioned in the business scenario above, we just need the workflow to send a review reminder email to the document’s creator.
- To get started, click on the Action button’s dropdown arrow and select Send an Email.
The phrase Email these users will appear in Step 1 of your workflow.
- Click on the these users hyperlink to configure your email.
- Click on the address book icon next to the To field. When the Select Users dialog box appears, double-click on the item User who created current item and click OK.
- Place your cursor in the Subject field and type in the subject line that you’d like to use for your email.If you want to include a blend of text and field data from your document library, click on the ellipses ( …) button. This will open the String Builder dialog box. Now you can type in your text and use the Add or Change Lookup button to add field data to your subject line. We opted to have our subject line use a blend of words and field data. Here are the results:
- Now you’re ready to enter the body text for your email. Type in whatever message you’d like to send. If you’d like to display item-level metadata in your email body, use the Add or Change Lookup button to select the field(s) you want to display. Consider adding in a hyperlink to your document as well. This makes it much faster (and easier) for your reviewers to find the document to review. For instructions on how to enter the item’s URL in your email body, take a look at Brian Jackett’s blog post.
- When you are finished defining the body of your email, click OK to save your email settings. You’ll automatically return to the main edit page of your workflow. The blinking orange line should appear directly below your Email action item.
- Click on the Action button’s dropdown arrow and select Log to History List. This action enables you to log a history message to your workflow history list. While your users won’t see this history log, it will be a useful tool for you and other admins to troubleshoot your workflow.
- The Log to History List action will be added to your workflow. Click on the this message hyperlink to add a message. Since I want this message to confirm that an email was sent to the document creator, I type in the message Email to document reviewer sent. Hit the Enter key to save your message.My workflow settings now look like this:
- Now it’s time to save and publish your workflow. Fortunately, all the buttons you’ll need to save and publish are located on the SharePoint Designer Workflow tab, which should be displayed immediately above your workflow settings. First, click on the Save button to save your workflow configuration settings. Then click on the Publish button. This publishes your new workflow and ties it to your document library.
- Exit out of SharePoint Designer 2010.
Part 3: Setting up your information management policy
- Go to your document library. Click on the Library sub-tab and select Library Settings.
- Under the Permissions and Management column, select Information management policy settings.
- Now you have to determine the granularity level you want for your information management policy. In SharePoint 2010, you can apply a policy at 3 distinct levels:
- Content Type level (the policy will apply to all documents in the current document library that are tagged with a specific content type (e.g. Document))
- Document library level (the policy will apply to all documents in the current document library, regardless of content type)
- Folder level (the policy will only apply to documents stored in a specific folder in the current document library)
By default, SharePoint 2010 assumes you want your information management policy at the content type level (as shown below).
To change your granularity level, click on the Change source link. (Note that changing your policy source has broad implications, including the suppression of all content type information policies. I recommend doing some in-depth research before making this change.)
Since content type management of information management policies is ideal for our business scenario, we’re going to leave the default Content Type selection.
- Since our document library is only using the default Document content type, we will click on the Document link to set up our information management policy.
- When the Edit Policy page appears, fill in an Administrative Description and a Policy Statement. Follow the on-screen prompts for details on these fields.
- Click on the Enable Retention checkbox.
- Click on the Add a retention stage hyperlink to set up the retention schedule for your documents.
- In the Time Period dropdown, select your Date for Review field. If you want to use this date as-is, place a 0 in the number of years/months/days to add.
- In the Action dropdown, select Start a workflow. Then select the specific workflow to start. In our scenario, we choose to have the Nag emails workflow started.
- Click OK to save your changes.
- Click OK again to save your new information management policy.
That’s it! Now when users upload documents to our document library, they’ll be prompted to specify a Date for Review. Once that date is reached, the retention schedule we set up will trigger the Nag emails workflow. When the workflow runs, it will send an automated email to the person who originally uploaded the document, telling them the document needs to be reviewed. Here is a picture of the email I received when the review date was reached for a document I uploaded:
Version note: This solution works in both MOSS 2007 and SharePoint 2010.