Solved

Automatically start SharePoint 2010 workflow based on document age

Posted on 2011-03-02
8
1,201 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 32

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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 32

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 32

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 32

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

617 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