Friday, May 20, 2011

Workflow: Reminder Before Due Date – MOSS vs. WSS

MOSS Reminder Workflow

  1. In the SharePoint task list, create a new column called Reminder Date, and set it as a Date field. Uncheck the “Add to default view” box, and click OK.
  2. We don’t want this field to be displayed to users when they are filling out the form, so we hide it.
    In the list’s settings, click Advanced Settings. Change Allow management of Content Types to Yes. Click OK.
  3. In the Content Types section of the list’s settings, click the name of the one content type in there. In this example, it’s “Task”. Then, in the List Content Type information screen, click the name of the Reminder Date field. Change it from Optional to Hidden, and click OK.
  4. Now it’s time to create a workflow that will set the Reminder Date. In SharePoint Designer, open the site, and click the File menu, and New… Workflow.
  5. Call it Task Reminder, and connect it to the Tasks list. Set it to run on create and on change.
  6. There need not be a condition, and the actions are the following:
    ”Add Time to Date”
    ”Set field in Current Item”

    (trick: to get that last underlined field to show a variable, choose workflow data as the source)
  7. Click Finish to save the workflow.

    Another important thing to note is that if your SharePoint Server has not been upgraded to service pack 2, this workflow could end up running in an infinite loop.
  8. Create a new item in the task list, and see this workflow in action. It fills in the Reminder Date field automatically. You can add this field to the default view, for testing purposes, so you’ll see the value get filled in.
  9. The next step is to create the workflow that actually sends the reminder email. Call it Task email, and uncheck all the boxes as so:
  10. Click Next.
  11. Create one action, to send an email to the person that the task is assigned to, and make the email say whatever you want. Then click Finish.
  12. Next, to set the policy… On the list settings screen, click Information Management Policy Settings. (This is only available in MOSS, not WSS)
  13. Click the name of the content type, in this case it is Task. Select Define a Policy, and click OK.
  14. Put a check box next to Enable Expiration. Fill in the section as follows. Remember, that when I created the Task Email workflow, I unchecked all the boxes that indicate when the workflow is supposed to run, but I can still kick it off using a policy!
  15. That’s it. Test it out. Make sure you fill in the Assigned To field on the tasks, so that the reminder email will go out.

Another note... It doesn’t let you put a ZERO here, for + 0 days. This is why I set my reminder date to calculate –8, since I know I’ll have to put a +1 here. Math. Negative 8 plus positive 1 equals negative 7, which equals a reminder 7 days ahead of the due date. Click OK.

About Information Management Policy settings and starting a workflow:
Each time after you edit the Task Email workflow in SharePoint Designer, you have to go back to the screen in the above screenshot, and RE-select the current workflow name, and click OK.

WSS Reminder Workflow

This section will show how different it is creating the same workflow in WSS. Since we don’t have the benefit of information management policy settings, we have to set a workflow to run, waiting for the reminder date to arrive.

  1. Create a new SharePoint Designer workflow, connect it to the tasks list, and set it to run each time a new item is created.
  2. The actions should be as follows:

    ”Add Time to Date”
    ”Log to History List”
    “Pause Until Date”
    ”Send an Email”

That’s all the WSS workflow entails, but there are a couple of drawbacks:

  • If the due date is more than about 2 or 3 months away, that paused workflow becomes more unreliable. There is an underlying “Workflow History” list on each site, and apparently it auto-purges records that are over 60 days old. I hear that this auto-purge can cause problems in long-running workflows.
  • Even if the workflow is set to run on create AND on item change, the reminder variable still doesn’t change when the task item’s due date is modified. There’s got to be a way around this, which would most likely entail a more complex workflow… but I’m sure it would have pausing involved.

3 comments:

cleonlim said...

I like your post and the way you structure your column t’was so cool. Keeps it going and I’ll keep coming back.

www.n8fan.net

Leslie Lim said...

First time I commented in a blog! I really enjoy it. You have an awesome post. Please do more articles like this. I'm gonna come back surely. God bless.

www.imarksweb.org

sarah lee said...

I really enjoyed reading your article. I found this as an informative and interesting post, so i think it is very useful and knowledgeable. I would like to thank you for the effort you have made in writing this article.


edupdf.org