workflow steps

Hi,

what I am trying to do is ..I am trying to delete documents in a document library two weeks after they are created.

I can't use retention policy so I am using a SPDesigner workflow to automate this process. I have attached the workflow steps.

Can anyone help are these the right steps?
steps.png
TechsavyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Matt CoughlinCommented:
Techsavy,
I think this would work, but I am wondering if maybe the pause should come after the twoweeksfromcreation variable is defined.
0
TechsavyAuthor Commented:
Or do you think we don't even need that variable. Just simply pause for duration and then delete item.
0
Matt CoughlinCommented:
Yep, that would be simpler.
0
How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

Matt CoughlinCommented:
But the variable acts as a double-check just in case something goes wrong. :-)
0
TechsavyAuthor Commented:
I have set up the workflow and what happens to the existing list items. Will the workflow has any effect on existing items? I see that they are automatically started. I thought workflow will only have effect on new items. but it looks like it starts automatically on existing items. Is this true?
0
Matt CoughlinCommented:
I guess it would depend on the parameters you specified on how the workflow is to be started.

When you first create a workflow, it asks you if you want it to run when new items are added or if anything changes on an item, or if you just want to run manually.
0
TechsavyAuthor Commented:
Well My workflow is set to start automatically only when new item is created. But when I publish the workflow, I think it starts on the items that already exist. Is this true?
0
Matt CoughlinCommented:
As far as I know, it shouldn't work like that. Which version of SP do you have?
0
TechsavyAuthor Commented:
I have sp 2010. I think it is initiating the workflow on all the items anytime someone adds a document. It should only initiate the workflow on the item that is created.
0
TechsavyAuthor Commented:
hi,

Do these steps cause any "infinite looping"? sometimes this logic is failing to start a workflow with a message "failing to start (retry).."
0
Matt CoughlinCommented:
As long as it is not set to start whenever an item is changed, there shouldn't be a loop.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Matt CoughlinCommented:
Were you ever able to determine what was going on with the workflows? Did the workflow start on every file like you thought it was?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.