1,804 articles and 14,829 comments as of Wednesday, May 11th, 2011

EndUserSharePoint has combined resources with NothingButSharePoint.com. You can now find End User (Mark Miller), Developer (Jeremy Thake) and IT Pro SharePoint content all in one place!

This site is a historical archive and is no longer being updated. Please update your favorites, bookmarks and RSS feeds.

NothingButSharePoint.com
Friday, January 15, 2010

How to get an SPD Workflow to Run at a Specific Time – Employee Vacation Reminder: Part 5

Dessie Lunsford
Points-of-Sharing 

Time to Test This Sucka!!

To test things out, go back to your list and create several test scenarios that will make sure the workflow runs as expected.

Test 1: Employee is on vacation for 1 day.

Test 2: Employee is on vacation for 2 days.

Test 3: Employee is on vacation for 3 days.

For each test, set the “Email Reminder Time” for at least 5 minutes into the future so the workflow has time to run.

Optionally (and as a better option for testing), you can go back into SharePoint Designer and modify the workflow to add in “10 minutes” instead of “1 Days” so you don’t have to wait several days to see the fruition of your tests.


After the first “Email Reminder Time” arrives, you’ll see the list update the “Count” and “Email Reminder Time” fields as well as getting your first round of emails.


Once a user returns from vacation (the “Count” and “Total Days Gone” values are equal, the workflow will run a last time and update the “Status” field to “Off Vacation” then complete.

Testing with 10 minute intervals instead of adding 1 day (initial item creation):


After the first “Email Reminder Time” has arrived:


After several updates:


After all Employees have returned from vacation:


Summary

Building out workflows in SharePoint Designer can sometimes be a daunting task, especially when you have to take in account for multiple scenarios in which the workflow has to do different things depending on which one it encounters.  To help with getting past some of the “Oh my god, where the heck do I start?” initial reactions, the best bet is to always start with listing out on paper, exactly what it is you’re trying to accomplish, then try and build it out into a simple flowchart of steps.  As you progress in defining and detailing it in the flowchart, you’ll start to add in the different choices and paths the logic can take.  Use tools like “Truth Tables” to help predict results, and test out the workflow parts individually by creating (simple) workflows in SPD and testing them against your list.  Once you get the “pieces” working, try merging them together…and eventually, you have a complete workflow that does all you want.

In this walkthrough, we’ve built a semi-complete solution that will do the task needed, but it will need some “polishing” in order to make it a “Production-level” workflow.  The “Total Days Gone” column should really be a calculated column based on the start and end date of an employee’s schedule that determines the number of days in between them, and the “Employees” column should be a lookup.  Custom views that take advantage of some of the enhancements by Christophe Humbert at PathToSharePoint.com would also be a major benefit for presenting information the list and visual indicators of who’s on vacation, how many days left, etc.  A lot of work could still be done, so consider this just a start.

Till next time…
– Dessie

Dessie Lunsford
Points-of-Sharing 

 

Please Join the Discussion

3 Responses to “How to get an SPD Workflow to Run at a Specific Time – Employee Vacation Reminder: Part 5”
  1. Dan says:

    Very clear and useful series. Thanks for providing, Dessie!

  2. PALLAVI says:

    It’s not working. My workflow completed without Status ‘Off Vacation’. Please suggest

    Thanks

Trackbacks

Check out what others are saying about this post...
  1. [...] How to get an SPD Workflow to Run at a Specific Time – Employee Vacation Reminder: Part 5 [...]




Notify me of comments to this article:


Speak and you will be heard.

We check comments hourly.
If you want a pic to show with your comment, go get a gravatar!