locked
SPD Looping Workflow? RRS feed

  • Question

  • Hi, 

    I am currently using SharePoint Designer to work on a project that involves setting up an automated training process for a large number of employees.  

    The Project includes the following requirements:

    • At approximately the same time each year, an email must be sent out notifying each employee of his/her training.  
    • The email notification must include a link to a particular training document and a brief questionnaire/survey attached to each document (Around 10 documents total).  
    • The workflow/s must include a form that will allow the employee to confirm through email that he/she has completed a particular training session/document.
    • It is required that the solution be code-free (Visual Basics is not an option).

    I have searched all over the place for a solution and am experiencing difficulty finding an optimal one. Here are my questions:

    1. Is it possible to develop a workflow that will run infinitely, once a year, without having to reactivate it? If so, do you know how?
    2. Is it possible to incorporate multiple documents (10+) into one workflow OR do I need to setup a workflow for each document? If so, can you give me an example?
    3. Assuming that I am able to run a workflow automatically, once a year.  What if a document is modified AND/OR the workflow contact list is altered; Would this throw off the automated workflow?

    All responses are much appreciated. 


    Thank you!

    Jerry

    Tuesday, June 12, 2012 2:06 PM

Answers

  • Hi JerrySPD_Beginner,

    If you can activate your policy once manually, it will be ok. So, I think your method is feasible.

    Thanks,

    Jack

    Tuesday, June 19, 2012 1:12 AM
    Moderator
  • Jerry, if I can just add a couple of things to this.

    I was put in similar situation where I had to create looping workflows that activated every 30 days and I found a soulution. HOWEVER it does come with a few words of warning. It means that you will have a running workflow for every item/document in you list/library and that will put strain on your SP environment. If your SP environment gets re-booted at any time then the workflows will attempt to start and depending on the number of workflows that are starting it may take some time and the SP admins might get a bit upset.

    So simply you need two workflows.....

    one that fires on creation and change of the item 

    one that fires when a change is made to an item

    It works  a bit like this item Created and Workflow 1 fires checks flag is set to N, does its stuff then it sets flag to Y and then ends. Because you have made a change to the item workflow 2 kicks off checks flag is set ot Y......waits X days and sets flag no N it ends. Workflow 1 kicks off...and we are back at the begining.

    You will also have to put some logic in there to make sure that the right workflow is running otherwise you get out of sync. The downside of this is that if at Day 360 the system gets rebooted then it will fire off and wait another 365 days. Youmay have to put some workflow logic in there about working out the number of days it has to wait on a system restart. Possible calculating the wait every time it is restarted based on an input date.

    I would say that this approach may not b the most recommended way of doing it but it works for small number of doucments

    Kenny

    Thursday, July 5, 2012 9:59 AM
  • Jack thank you for your feedback.

    I was informed that I could use a retention policy  to set my workflow up (For Document OR Library) to automatically repeat using a Retention Policy.  From what I understand, I would only have to activate this policy once (Manually, create new Document, etc.) and it will repeat automatically according to the recurrence settings I established. I think this should work. What do you think?

    Jerry

    Monday, June 18, 2012 2:25 PM

All replies

  • Hi JerrySPD_Beginner,

    First, you should new a document library. This document library is for all your attachment file for training.

    Second, create a list for timer job add some content.(you can refer to this blog http://peterkt.wordpress.com/2008/08/01/creating-a-timer-job-in-sharepoint/ )

    Third, create a timer job let it execute every year, when the time job add an item in your list, it will trigger the SharePoint designer workflow.

    Forth, create your SharePoint designer workflow, bind the workflow to the list. SharePoint designer workflow is easily send email with attachment. http://spdactivities.codeplex.com/wikipage?title=Send%20Email%20with%20List%20Item%20attachments

    Fifth, create a task to everyone in your designer, if the people complete the training, he or she can complete the task.

    Thanks,

    Jack

    Thursday, June 14, 2012 8:44 AM
    Moderator
  • Jack,

    Thank you for your helpful response, but as I mentioned in my original post, my recurring workflow must be a solution that does not involved coding. I am in a temporary position and the people that I am leaving this SP automated workflow to are not tech-savy.  If they need to make adjustments to this workflow at any point, they will not be able to deal with code.  Do you have any other solutions.

    Thank you.

    Jerry

    Thursday, June 14, 2012 4:52 PM
  • Hi JerrySPD_beginner,

    The out of box of SharePoint designer is so difficult to implement it. If you don’t want develop a time job by coding, may be you can could delay your SharePoint designer workflow.

    Thanks,

    Jack

    Friday, June 15, 2012 9:03 AM
    Moderator
  • Jack,

    I have considered this, but this will this repeat continuously OR will it only repeat the notification once and then end?

    Jerry

    Friday, June 15, 2012 2:16 PM
  • Hi JerrySPD_Beginner,

    In your requirement, you should maintain the mail  body, so you’d better put your mail body in your list, then you can maintain it easily. And you documents is also should in your library, if you want change it, then it will be very convenient. So, when you send email , then email body is from your list, the attachment is from your library.

    This is can be accomplish except the once a year without coding. So, your SharePoint designer workflow is must be start when item is created or changed. So, for example, every year of June 18 is your training day, you can add an item in your list on that day , then start the workflow. Or you can start the workflow manual.

    Thanks,

    Jack

    Monday, June 18, 2012 2:17 AM
    Moderator
  • Jack thank you for your feedback.

    I was informed that I could use a retention policy  to set my workflow up (For Document OR Library) to automatically repeat using a Retention Policy.  From what I understand, I would only have to activate this policy once (Manually, create new Document, etc.) and it will repeat automatically according to the recurrence settings I established. I think this should work. What do you think?

    Jerry

    Monday, June 18, 2012 2:25 PM
  • Hi JerrySPD_Beginner,

    If you can activate your policy once manually, it will be ok. So, I think your method is feasible.

    Thanks,

    Jack

    Tuesday, June 19, 2012 1:12 AM
    Moderator
  • Jack,

    Our Microsoft Team would not change any timer jobs from the default (Weekly) to hourly.  Basically, their response was that they have chosen to leave SharePoint 2010 at its default settings for maximum optimization.  I would think lowering the Timer Jobs would increase optomization, but maybe I am wrong.

    Anyhow, I have waited over 2 weeks, and have not seen any of my Retention policies activated. I have tried all scenarios. 

    My question is; If the IMP and Expiration Timer Jobs are set to weekly, will any of my retention policies run if set them to activate and/or repeat in 7 days or more? 

    Like I said, I have not seen any activate and it has been over 2 weeks.  I have a limited amount of time in this position and need to see that these policies run correctly to activate and repeat my workflow, otherwise I must look for another solution.

    If you have any suggestions please let me know.

     

    Jerry

    Monday, June 25, 2012 2:36 PM
  • Jerry, if I can just add a couple of things to this.

    I was put in similar situation where I had to create looping workflows that activated every 30 days and I found a soulution. HOWEVER it does come with a few words of warning. It means that you will have a running workflow for every item/document in you list/library and that will put strain on your SP environment. If your SP environment gets re-booted at any time then the workflows will attempt to start and depending on the number of workflows that are starting it may take some time and the SP admins might get a bit upset.

    So simply you need two workflows.....

    one that fires on creation and change of the item 

    one that fires when a change is made to an item

    It works  a bit like this item Created and Workflow 1 fires checks flag is set to N, does its stuff then it sets flag to Y and then ends. Because you have made a change to the item workflow 2 kicks off checks flag is set ot Y......waits X days and sets flag no N it ends. Workflow 1 kicks off...and we are back at the begining.

    You will also have to put some logic in there to make sure that the right workflow is running otherwise you get out of sync. The downside of this is that if at Day 360 the system gets rebooted then it will fire off and wait another 365 days. Youmay have to put some workflow logic in there about working out the number of days it has to wait on a system restart. Possible calculating the wait every time it is restarted based on an input date.

    I would say that this approach may not b the most recommended way of doing it but it works for small number of doucments

    Kenny

    Thursday, July 5, 2012 9:59 AM