2011 05 17 MV: Recently at my current client site we were asked to create a mechanism whereby key content which possessed a Content Expiration Date could be monitored so that starting say 30 days from expiration an email would be sent to the designated Content Owner reminding them the content needed to be “refreshed”.
NOT moved to a different place.
Simply “refreshed” so that it remained relevant, and could continue to reside in its current location.
You see, SharePoint 2010’s OOTB content management features seem to be annoyingly narrow-focused, imagining that content is either current, or must be moved, or must be deleted.
But my client’s request that their content simply be “reviewed, refreshed and have the expiration date reset” I think is perfectly VALID, typical request which SharePoint does a poor job of addressing – PARTICULARLY that aspect of monitoring for a date BEFORE the Content Expiration Date, and taking action based on some calculated date value.
We explored a number of options – creating additional calculated columns (e.g. ContentExpirationDate-30, etc etc), as well as creating custom daily batch/timer jobs, but ultimately each of these grew increasingly complex & annoying. We even were exploring Information Management Policy Settings, only to discover that we could NOT trigger “stages” based on a date which came from a CALCULATED COLUMN (e.g. the ContentExpiration-30 column), so all paths seemed to lead to frustration.
Then an esteemed colleague “The Bartman” made a single key observation – that at some point say a year into production, there would at any time be MYRIAD workflows all running against expired or expiring content, so each individual workflow must represent a microscopically-small performance hit on the web servers.
While this may SEEM like an innoccuous statement, in fact it was key in realizing we COULD leverage SP2010’s OOTB IM Policy Settings to realize my ever-desireable “The Elegant Solution”…
NO MORE did we have to worry about creating custom timer jobs which ran daily!
NO MORE did we have to worry about calculated (date) columns whose values were in fact NOT perceived by SharePoint as datatype DATETIME !
Here’s what we did:
CREATE a simply SharePoint Designer 2010 Globally-Reusable Workflow (GRWF) which – when triggered – only has to do the following: �
IF ( (ContentExpirationDate – 30) < Today )
IF ( ContentExpirationDate > Today )�
SEND reminder/alert email only to Content Owner
SEND reminder/alert email to both Content Owner and Department Head
Wow. Totally elegant workflow, and globally-reusable to boot!
So HOW do we trigger this to run on ALL designated content (in our case specific libraries in key root site and subsite libraries), DAILY?
Surprisingly (nay – ELEGANTLY) simple:
BROWSE to Library (e.g. Pages) in question
ADD the GRWF to the library (list):
NAVIGATE to Library > Library Settings > Workflow Settings
CHOOSE GRWF from the list of “workflow templates”
OK your way out
CONFIGURE the IM Policy Settings
NAVIGATE to Library Settings > Information Management Policy Settings
CHANGE Source of Retention Settings to “Library & Folders” by clicking on link “Change Source”
=> a new config page pops up
CHOOSE “Library & Folders” radio button
OK your way out; now
CLICK on suddenly-changed-its-name link from “Change Source” to “Change source or configure library schedule”
=> Retention Stage Config Page displays
CLICK on “Add a retention stage” link
EVENT = “Created + 0 Days”
ACTION = “Start a Workflow”
WORKFLOW = “Name of your new GRWF, renamed (slightly, like by adding ‘WF” to end) when you added the template to this library (list)
RECURRENCE (optional) = enabled, and period= 1 day
That”s IT !
It SEEMS like a lot, but in the end all you’re doing is ADDING the workflow to a list, then CONFIGURING a new retention policy to start the moment the document is uploaded, and will run DAILY on each item.
NO custom timer job – you leverage the EXISTING mechanism.
NO custom coding – all easy-to-use SharePoint Designer 2010.
I’m going to publish this post without screenshots, but later will add them as I scrub them from my current client.
There are LOTS of variations & additional enhancements, but I hope this inspires many others to create their own elegant solutions.
Per habit, thanks to clients Linda for her vision and The Bartman for his moment-of-clarity.
February 2015 M T W T F S S « Jun 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
- REVELATION: SharePoint isn’t THE THING… it’s the thing that GETS you to THE THING…
- PRESENTATION: State Machine Workflows – A Design Pattern for SharePoint Designer
- HOW TO: Some simple steps for using ParsleyJS field validation with native SharePoint list forms
- HOW TO: CREATE a Practical Dashboard using a SharePoint List & jQuery…
- HOW TO: DEFINING a Catalogue (“Taxonomy”) for your SharePoint Environment…
Top Tags2010 Architects Battling Ambiguity build numbers calendar collaboration columns with headings configuring constrained CQwp customizing custom list item style Dashboard Designer development Difference Distinction Document Properties exception messages how-to's Lookup Columns Master Builders parsing ID parsing value Project Management properties link publishing features reference ROI Sharepoint SharePoint 2010 SPFieldLookupValue class suppressing timestamps tabular output Timer Job tips tricks version view workaround workarounds workflow workflow history Workflows XSL