Solved

Document detention workflow

Posted on 2014-07-26
6
258 Views
Last Modified: 2014-08-03
Hi,

I have  a document library in SharePoint 2007. Periodically, we upload documents from a network share into a folder X in the document library. Now I need to set up a workflow where I need to delete these documents automatically 10 days after they are posted. I don't want to delete the parent folder that the documents are contained in. I only want to delete the documents.

Is there a way to set this up using "Pause Until Duration" workflow condition in SharePoint Designer?

Any help is greatly appreciated.

Thanks,
0
Comment
Question by:Techsavy
  • 4
  • 2
6 Comments
 
LVL 29

Expert Comment

by:QPR
ID: 40223557
I assume we are talking about deleting the files in the doc library and not the network share?
Have an automatic workflow (runs when a new item is added) that calculates the difference between today + 10 days.
Then pause the workflow until that date rolls around. Delete the file.
0
 
LVL 29

Expert Comment

by:QPR
ID: 40223560
This is SP 2010 but should be the same
http://office.microsoft.com/en-nz/sharepoint-designer-help/workflow-actions-in-sharepoint-designer-2010-a-quick-reference-guide-HA010376961.aspx

Look at the text for:
Add Time to Date
Pause until Date
Delete Item

If the person who triggers the workflow (the person who uploads the doc) does not have delete permissions then also look at inserting an impersonation step so that the action can be carried out under another security context
0
 

Author Comment

by:Techsavy
ID: 40225967
Hi QPR,

I am sorry it is my fault that I did not explain the problem correctly.

The workflow should automatically trigger on every newly created item so the folder or document library will not contain any documents that are more than 10 days old. so there is no human intervention. In that case do we need impersonation step?

Second, instead of setting this workflow on entire library is it possible to set up this workflow on all the items that belong to a particular folder or folders?

Thanks
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 29

Accepted Solution

by:
QPR earned 500 total points
ID: 40226009
No human intervention is required to trigger the workflow - you set the workflow to run when "a new item is added"
The workflow will auto-start, pause until the required date, auto-delete the item.
Impersonation is only required if the account that added the new doc does not have permission to delete items (probably will if using standard contribute permissions)

I don't think you can specify a workflow only run for items in a particular folder. You could add some logic to the workflow (and I'm guessing here) to check for the parent url maybe but I've never tried this.
0
 

Author Comment

by:Techsavy
ID: 40227294
I need help on this to determine if we can do this on a particular folder.
0
 
LVL 29

Expert Comment

by:QPR
ID: 40227755
I don't this is possible, you may have to use a separate library. Workflows are library specific
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 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