Learn more about SQL Server tools

mssqltips logo
 

Tutorials          DBA          Dev          BI          Career          Categories          Webcasts          Whitepapers          Today's Tip          Join

Tutorials      DBA      Dev      BI      Categories      Webcasts

DBA    Dev    BI    Categories

 

Information Management Policy - Expiration Problem in MOSS 2007


By:   |   Read Comments   |   Related Tips: > Sharepoint

Attend this free live MSSQLTips webcast

Tips and Tricks to Growing Your SQL Server Estate from SMB to Enterprise Scale
Thursday, June 28, 2018 - click here to learn more


Problem

IMP Expiration Policy Gotcha

Here is an unforeseen consequence of using MOSS 2007 Information Management Policy (IMP) Expiration. The IMP sets a flag on the document to make it exempt from the policy thereafter, which meant the workflow would never run again even if the Expiration Date was reset, because the document is exempt!

For example - Trigger a custom Review Workflow if the "Expiration Date" is today...

enable expiration

You can check this by viewing a documents properties.

exempt from policy
Solution

There are three solutions to this issue:

  1. View the Document Properties and use the "Remove Exemption" link in the "Exempt from Policy" field to remove the exemption
  2. Remove the Exempt flag in code; this is a custom workflow
  3. In our scenario; use a custom SharePoint timer job instead of IMP!

We choose option 2, remove the Exempt flag using code as we developed the workflow in pure code. This was fairly easy to do with the following lines of code, however you need to make sure you do it during the right part of your workflow/process.

using Microsoft.Office.RecordsManagement.InformationPolicy;
Policy.RemoveExemption(file.Item);

Bonus Tip

The IMP Expiration job fires once a day by default and can also be started by hand, which is great for troubleshooting an issue like this. I believe starting it by hand was added in service pack 2.

Central Administration > Operations > Policy Features and Resources˙ > Expiration

configure expiration
Next Steps


Last Update:


next webcast button


next tip button



About the author





Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name    *Email    Email me updates 


Signup for our newsletter
 I agree by submitting my data to receive communications, account updates and/or special offers about SQL Server from MSSQLTips and/or its Sponsors. I have read the privacy statement and understand I may unsubscribe at any time.



    



Learn more about SQL Server tools