Solved

Automatically start SharePoint 2010 workflow based on document age

Posted on 2011-03-02
8
1,192 Views
Last Modified: 2012-05-11
We have a document library consisting of resumes of our consultants; all are Word documents. Can we build a workflow in SharePoint Designer 2010 that looks at the 'last modified' date of each document and if it is longer than six months, email the owner of that document?

I have built a few other workflows across our SharePoint 2010 platform but all of them start when a document is added or modified; I'm not sure how to configure a workflow like this to automatically run and watch the dates.

Thanks!
0
Comment
Question by:ICG
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 31

Accepted Solution

by:
Jamie McAllister MVP earned 500 total points
ID: 35018802
You might be better off introducing a Delay activity in the WF that resumes the WF six months after the document has been added.

So the WF starts when the document is added, pauses for 6 months with the delay activity, and then re-hydrates and performs the final necessary actions.
0
 
LVL 6

Expert Comment

by:psv1973
ID: 35019081
Why don't you create a timer job which check the dates on a daily basis?
0
 
LVL 43

Expert Comment

by:zephyr_hex (Megan)
ID: 35019169
i concur with the custom timer job method.

if you delay a WF for 6months, it's actually in a partial running state... like "pause", which means it's using resources.  custom timer job would trigger when it's time to run, so there are no wasted resources.
http://dotnetfinder.wordpress.com/2010/07/24/creatingcustomsharepointtimerjob2010/
and more info here:
http://platinumdogs.wordpress.com/2010/05/05/sharepoint-developing-custom-timer-jobs/
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 31

Expert Comment

by:Jamie McAllister MVP
ID: 35019215
Actually the WF gets dehydrated - i.e. serialized to XML and a built in timer job polls to see whether the WF should be rehydrated and resumed. In no sense is the WF hanging around in RAM using resources. The timer job that polls dehydrated WF runs anyway whether you use Delay activities or not.

Timer Job = custom development whereas the questioner mentions SPD 2010.
0
 
LVL 1

Author Comment

by:ICG
ID: 35019658
Thanks for the ideas!

Related question; within this same workflow: we have managed metadata columns in this list. For each resume, there is a column displaying who's resume it is and another column displaying the employee type (W2 or 1099). I would only like this workflow to apply to W2 employee's so I am setting up the workflow to terminate itself if the data in the employee type column DOES NOT equal W2.

Whenever I perform a lookup on the EE Type column, it returns the EE type plus a long string as shown below:

W2|9cde55d2-8823-4cf9-abe5-fff02c583435

Same for the employee name column, it returns:

(ee name here)|9cde55d2-8823-4cf9-abe5-fff02c583435

Is there a reason for it append the extra string?
0
 
LVL 31

Expert Comment

by:Jamie McAllister MVP
ID: 35019817
You're seeing the raw value of the managed metadata value. The first part is the bit visible in the UI and the second is the underlying identifier. A lot of fields in SharePoint are like this. Use a string function to split on the vertical bar if you need to.
0
 
LVL 1

Author Comment

by:ICG
ID: 35019858
Is that a built in option with SPD?

I see these options:

Extract Substring from Start of String
Extract Substring from End of String

Both of these seems to only allow you to extract a specific number of characters from the string.
0
 
LVL 31

Expert Comment

by:Jamie McAllister MVP
ID: 35020447
You're right. It's possible to extend the functions.

This project on Codeplex gives the string functions you need to do this;

http://spdwfstringactions.codeplex.com/

No Split, but it has IndexOf and Substring which will do the trick.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SharePoint display modal blank 2 63
SharePoint 2010 Foundation Gatherer 10 82
sharepoint 2013 foundation 2 28
Sharepoint list to Access database 9 51
Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question