Pause a workflow 2 days before start date

  • 26 January 2015
  • 4 replies
  • 3 views

Badge +3

Hi All

I have a leave workflow which is working fine with no issues

What I want to do is to pause the workflow 2 days(48 hours) before start date of the workflow/leave request

When applying for leave you supplier a start date and the end date, just before the initiator goes on leave the workflow should pauselet the line manager know 2 days before going on leave.

Could someone assist me in doing this in a workflow

Appreciate any help

Thanks


4 replies

Badge +17

Michelle,

Great question and one that often confuses a lot of users on how to pull off.  I have seen users use the pause until action to achieve this function, but there are other ways to get this done.

Requirements as I see it:

The users puts in a leave request and sets the dates they want to leave.  Upon approval of leave, you want a workflow to notify the manager that the employee has leave in two days.

Options:

  1. If you have a workflow that runs for the actual leave request that runs it through the approval process, you could add the following logic:
    • Sends a notification to the manager two days before the scheduled leave date (use the calculate date option to calculate the leave date minus 2 days or 48 hours, and add a pause-until that date then send a notification)
  2. In a new workflow, you would grab the date for the start leave as a variable (leave date).  Use a calculate date to subtract two days from that and set a new variable (notify date). Use a pause until action and pause it until the notify date.  Then notify the manager using the send a notification action. This workflow would need to have a condition set for starting, it would need to start on change and only run if the leave status is set to approve.  This prevents your workflow from running every time an item was changed, but it would still run once the logic hit correctly in all places.

Let me know if these point you in the right direction.

Eric

Badge +3

Thank you

Just exactly what I needed..

Badge +17

Glad to help.

Badge +1

Have you find a solution for this? As you say, it works fine only if the dates don't change.

Is a Site Workflow a better option?

Reply