Information Management Policy is one of those oft-overlooked features in SharePoint. It can really help organizations keep content fresh, but like so much else in SharePoint, the devil is in the details. Depending on the scenario you’re trying to implement, you may find some details causing confusion.
In one recent case, a customer asked for a solution that prompted users to review content that hadn’t been modified in 365 days. Initially, this seemed straight forward. Set up policy to review every 365 days, like this:
But, reading the recurrence description made me think there may just be a devil lurking in this dialog. So I wouldn’t have to wait a year, I set up a series of tests that expire in 1 day, with varying settings. Based on those tests, here are some gotchas I learned.
The retention policy, will _not_ recur just based on Modified date. In the example above, the initial workflow will only occur once, as noted at the bottom of the dialog. So if it kicks off after 365 days, and the user changes the modified date, it will not kick off again in another 365 days unless you specify a ‘recurrence’. To me, this does seems counter-intuitive. I expected changing the modified date to reset the clock for the recurrence policy. But, I think the concept is that the item is flagged as having “expired”, and will never “expire” again, regardless of what actions the user takes. The workflow option is more intended to move the document elsewhere, archive it, etc. Still, by specifying recurrence of 365 days, you get the desired behavior: the workflow runs every 365 days.
The recurrence happens based on the _initial_ occurrence. So, after the initial review kicks off, if you specify a recurrence period of 365 days, the workflow will run every 365 days from the time the document first expired, regardless of modified date. Again, this is counter-intuitive to me. I expected- and the customer wanted- the review to occur every time the document had not been modified in 365 days. This is, in fact, the initial behavior: editing the document bumps up the initial occurrence. But, once that first “expiration” happens, the recurrence will be every N days, regardless of changes to the document.
So, how do we handle this scenario? It takes a little more logic in the workflow, but is not to difficult. Simply set the initial occurrence to 365 days after modified date, but the recurrence to a more frequent period – say 2-4 weeks. Then, add logic in the workflow to check the modified date:
This way, the workflow will be kicked off initially at 365 days. After that, every 2-4 weeks. But only if necessary will an actual review take place.
Bonus Powershell Timer Job Kick
Expiration Policy Processing occurs weekly by default. If you ever need to test, or want to trigger processing at once, you can run the timer jobs in CA, or Powershell:
Get-SPTimerJob | ?{$_.Name.Contains(“ExpirationProcessing”)} |%{$_.RunNow()}
I didn’t find many specifics on how those settings played out, so I hope this is helpful for somebody (maybe me?) down the road.
1 comment:
Hello, It's a main part of sharepoint and your blog is related to this information thanks for sharing post.
I would like to shareoint community, So if you have any question for SharePoint Development are welcome.
Thanks.
Post a Comment