none
Task reminder workflow using sharepoint designer RRS feed

  • Question

  • Hi ,

    I have created a workflow to remind the tasks created. The workflow is triggered when a task is created or when an item is changed in the task. The workflow stops even before the condition is achieved(my condition is the workflow keeps sending mail everyday until the task is completed.).

    I used sharepoint designer to create this workflow. Is sharepoint designer the best pick for such kind of workflows. The workflow should keep running whenever an item in task is changed until the task status changes to completed.

    Thx in Advance.

     

    Thursday, November 11, 2010 1:26 PM

Answers

  • Ok, that's not what I meant.  The 2nd list is ONLY to provide a boomerang effect for the original task list.  You should only have one task list and then a hidden custom list that no one ever sees nor uses.  Its only purpose in life is to re-trigger the original workflow.  You should never delete your tasks, because then it breaks the original workflow.

    The only thing you should put in the 2nd list is the ID of the task in the task list, because that's the value you'll use to match the hidden list to the task list.  This is what you'll use in your logic statements to tell the hidden list which task to edit each day:

    Main workflow

    • Item is created
    • Workflow starts and creates a task (the task list should notify the user, not a workflow email)
    • When you use the built-in task process, it automatically pauses the workflow until the task is completed

    Secondary workflow

    • This workflow is on the task list
    • Item is created by Main workflow
    • Workflow starts and immediately pauses for a day
    • Next step has a condition that checks to see if the task is complete.  If not, it sends a reminder email, then creates an item in the hidden list with the ID of the task in the Title (only field you need in the custom list)
    • If the task is complete, stop the workflow.
    • Be sure to have logic at the beginning that tells this workflow to behave properly when the original item is edited.  You may not want to run it on edit - depends on your solution

    Tertiary workflow

    • This one is added to the hidden list
    • All it does is edit the original task by using Update List Item, and you use the Title field to tell it which ID to update in the Task List.  Simply update a hidden field that isn't used, and that will kick off the secondary workflow again, which will cause it to pause for a day

    You can probably avoid all of this by just copying and modifying the OOTB Approval workflow.  It has Due Dates with reminders built-in that you can configure.  Not sure why none of us mentioned that originally.  Yes, SPD can't loop, but it has a built-in feature for task reminders.


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    • Proposed as answer by Wayne Fan Monday, November 15, 2010 7:24 AM
    • Marked as answer by crm40 Tuesday, November 16, 2010 4:08 AM
    Monday, November 15, 2010 5:53 AM

All replies

  • SPD doesn't include a looping capability, so this kind of recuring activity isn't easy to do.  Visual Studio or one of the third party tools that inlcude a looping function would be a better choice.
    Paul Stork SharePoint Server MVP
    Thursday, November 11, 2010 2:28 PM
  • It should work.

    I suggest you to create a 1 action workflow and attach it to your task list when an item is modified and test it.

    Anyway If you could buy Nintex Workflow , is highly recommended.

     

    Good luck

    Thursday, November 11, 2010 5:30 PM
  • You didn't explain what you built.  What did you do to make it send mail everyday.  I don't know of such a capability, so please explain.  SPD workflows DO run each time the item is changed, but unless the item is changed every day, how can it send an email each day?  SPD is the only tool to build workflows unless you purchase a 3rd-party tool or create them with custom code in Visual Studio.

    Daily reminders are usually done through timer jobs, but if you want to do it in an SPD workflow, you create a custom list that is hidden (easy to hide it in SPD), and you make sure your workflow in the Task list creates/updates an item in the hidden list.  Then, you have a workflow in the hidden list that re-updates the task in the Task list so that the one-day pause triggers for the daily email.


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Friday, November 12, 2010 3:04 AM
  • Hi

    sorry for the delayed response and appreciate all your responses.

    The workflow was built on MOSS 2010 using SPD. E-Mail Reminder Sent and EMail Reminder Count are 2 new columns

    Step 1

    If Current List:Status equals Completed
     
     Log Task has been completed.to the workflow history list
     then stop the workflow and log Done.

    Step 2
     
        IF Current list: First E-Mail Reminder Sent equals No
          Email administrator
          then set First E-Mail Reminder Sent to Yes
          then Pause for 1day 0 hours 0 minutes
          then Set variable:TempCounter to Current List:Email Reminder Count
          then Calculate Variable:TempCounter plus 1 (Output to Variable:calc)
          then Set Email Reminder Count to Variable:Calc

    Step 3

         IF Current list: First E-Mail Reminder Sent equals Yes
          Email administrator
          then Log Sending Subsequent E-Mail to the workflow history list
          then Pause for 1day 0 hours 0 minutes
          then Set variable:TempCounter to Current List:Email Reminder Count
          then Calculate Variable:TempCounter plus 1 (Output to Variable:calc)
          then Set Email Reminder Count to Variable:Calc

     

    Appreciate your help.

    Thx in Advance.

    Friday, November 12, 2010 3:54 AM
  • Ok, then what?  You stated, "my condition is the workflow keeps sending mail everyday until the task is completed," but the workflow steps above do not do this. That workflow will only send an email when the item is edited plus one more email a day later.  That all should work, but it's not going to send an email everyday.  It's only going to send 2 emails, and it's going to send 2 emails even if the task is completed after the first step.  The 2nd pause doesn't do anything to help you, nor do the counters.  You aren't even referencing the counter fields in any conditions.

    Also, whenever you pause, you should ALWAYS have another conditional step to check the status again, because if the task was completed while pausing for a day, then you don't want to send an email.  You didn't add any condition checks after the pauses, but even so, it's not going to send emails every day, so it's no use doing it that way.  I recommend trying the multi-list idea using the boomerang effect.


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force

    Friday, November 12, 2010 4:48 AM
  • thx clayton for the response. As am a beginner SPD and just trying out some new stuff. I am triggering the workflow whenever an item is changed/created. My assumption was as I created a new field Email reminder count when the counter increments the workflow should start all over again until the status of the task is completed. How to modify the above mentioned workflow. your help is greatly appreciated. Thx in Advance.
    Friday, November 12, 2010 4:54 AM
  • Workflows can't start themselves.  The counter edit does not re-start the workflow.  It only starts again when edited by a user.

    I told you above how to modify the solution - you can't just modify the workflow.  SPD workflows can't loop and can't start themselves unless you add a custom activity that you build in Visual Studio 2010.


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Friday, November 12, 2010 5:08 AM
  • thx clayton for sharing your views.I will try it out using VS2010.

    Any suggestions  for material related to Workflows to get accustomed with. Would appreciate it if  you can provide some to me directly .

     

    Thx in Advance.

     

     

     

    Friday, November 12, 2010 5:13 AM
  • I wasn't recommending you build it in Visual Studio.  I gave you the solution for doing it in SPD above - no code required.  Are you just going to go straight to Visual Studio to write the code yourself?  Are you a SharePoint developer?
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Friday, November 12, 2010 5:24 AM
  • Can you please elaborate the Multi list suggestion above.

    thank you.Going forward will try to use VS 2010 for complex WFs. Was asking for any online material corresponding material related to Workflows.I am not a sharepoint developer.

    thx in Advance.

    Friday, November 12, 2010 5:47 AM
  • This isn't just basic, easy stuff.  YOu don't just read an article and start building custom SharePOint workflows. YOu need to be a SharePoint developer to do SharePOint development - that's what this is.  It seems like there is not an appreciation for the magnitude of what we're discussing here.

    What else do I need to elaborate on for the multi-list idea?  I don't plan to write out the entire solution on a forum, but if you ask about specific pieces, I will be happy to answer.


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Friday, November 12, 2010 6:34 AM
  • Hi,

    I have created 2 lists namely Tasks and pending tasks.

    I have a workflow corresponding to each list.

    My approach:

    When a task is created ,the workflow triggers and sends a mail to the "assigned to user".

    then pauses for a day

    checks whether the task is completed or not.

    if not create a new task with the same details of current task into  list 2.

    delete the task in the current list 1.

    When the task is created in new list 2 the workflow triggers.

    checks whether the task is completed or not.

    sends a mail to the "assigned to user".

    then pauses for a day

    checks whether the task is completed or not.

    if not create a new task with the same details of current task into another list 1.

    until the task is completed.

    The workflow doesn't trigger after moving for the second time into list 1 . what might be the reason behind it. Is this a valid approach.

    Any help is appreciated.

    Thx in Advance.

    Saturday, November 13, 2010 11:26 AM
  • Ok, that's not what I meant.  The 2nd list is ONLY to provide a boomerang effect for the original task list.  You should only have one task list and then a hidden custom list that no one ever sees nor uses.  Its only purpose in life is to re-trigger the original workflow.  You should never delete your tasks, because then it breaks the original workflow.

    The only thing you should put in the 2nd list is the ID of the task in the task list, because that's the value you'll use to match the hidden list to the task list.  This is what you'll use in your logic statements to tell the hidden list which task to edit each day:

    Main workflow

    • Item is created
    • Workflow starts and creates a task (the task list should notify the user, not a workflow email)
    • When you use the built-in task process, it automatically pauses the workflow until the task is completed

    Secondary workflow

    • This workflow is on the task list
    • Item is created by Main workflow
    • Workflow starts and immediately pauses for a day
    • Next step has a condition that checks to see if the task is complete.  If not, it sends a reminder email, then creates an item in the hidden list with the ID of the task in the Title (only field you need in the custom list)
    • If the task is complete, stop the workflow.
    • Be sure to have logic at the beginning that tells this workflow to behave properly when the original item is edited.  You may not want to run it on edit - depends on your solution

    Tertiary workflow

    • This one is added to the hidden list
    • All it does is edit the original task by using Update List Item, and you use the Title field to tell it which ID to update in the Task List.  Simply update a hidden field that isn't used, and that will kick off the secondary workflow again, which will cause it to pause for a day

    You can probably avoid all of this by just copying and modifying the OOTB Approval workflow.  It has Due Dates with reminders built-in that you can configure.  Not sure why none of us mentioned that originally.  Yes, SPD can't loop, but it has a built-in feature for task reminders.


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    • Proposed as answer by Wayne Fan Monday, November 15, 2010 7:24 AM
    • Marked as answer by crm40 Tuesday, November 16, 2010 4:08 AM
    Monday, November 15, 2010 5:53 AM
  • thx a lot clayton.will work on it and update.

     

    Monday, November 15, 2010 6:02 AM
  • Please resolve that other thread first, please.  If it's resolved, then close it out.  Thanks!
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Monday, November 15, 2010 6:12 AM
  • worked like a charm.thx for your guidance.

     

    Tuesday, November 16, 2010 4:09 AM
  • Hi Mr. Clayton, I have used your solution for making a looping workflow same as above but I was stucked in the Update List Item section in the Hidden List. How do I tell workflow to use the Title field to tell which ID to update in my TaskList? Appreciate any help.  Below is my workflow setup

    •  
      • This one is added to the hidden list
      • All it does is edit the original task by using Update List Item, and you use the Title field to tell it which ID to update in the Task List.  Simply update a hidden field that isn't used, and that will kick off the secondary workflow again, which will cause it to pause for a day

    Scenario: Check every 7 days if status field is Completed

    Main Workflow

    1. When item is created/updated
       - Pause for 7 days
    2. Then
       - Check status if "completed"
       - if completed: log completion message and stop workflow
       - if not send email to [requestor]
       - then Create item in hidden list (set title to tasks ID number)

    Hidden List Workflow
       - when new item is created or edited start workflow
       - Update list item in [tasklist] -- this where problem starts, i cant figure out how to tell workflow which ID to update

    Friday, February 11, 2011 2:21 AM
  • Hi Clayton,

    Have a question. I have implemented exactly same logic that you descibed. Have a query. This Logic doesnt consider business days. So do you think we have to write additional logic for that?

     

    Monday, September 26, 2011 8:48 PM
  • Thanks, Clayton!

    I was breaking my head over writing recursive workflows. Your post help me solve it!

    Monday, March 26, 2012 11:09 AM