Change the pause until value if the item date changed

  • 15 April 2019
  • 4 replies
  • 10 views

Badge +3

I have a simple workflow that reads an item property date value, for (example Expiry Date), the worflow will start on creation or editing the item.

- a variable will have the value of 3 dayes before the expiry.(using Configure Action - Calculate Date)

- Puse until the variable value.

- send the notification

now the workflow will trigger the notification 3 days before the expiry date that was set on  item creation time.

it happen sometimes we update the expiry date before the notification time, but still the email being sent according to the initial expiry date.

can the work flow consider the new updated expiry date value before sending the email and recalculate the required time to send the notification?

Many Thnaks

 

  

 


4 replies

Userlevel 4
Badge +11

Hi,

 

if new expiry date is later than the original one, you could do a check after the pause if current date is equal to (current item expiry date -3) and if not, start a pause again (and put this in a kind of loop in order to do this until the condition isn't true..

 

if new expiry date is before the original one, I don't think there is something you can do, unless you manually end the workflow and restart..

 

a totally different approach could be to have a site workflow that checks everyday for items with expiry day = current date +3 and for each of them it sends an email..in this way you don't have any workflow waiting for a date that can change but the control is done every day..

Badge +3

@jackgelo wrote:

Hi,

 

if new expiry date is later than the original one, you could do a check after the pause if current date is equal to (current item expiry date -3) and if not, start a pause again (and put this in a kind of loop in order to do this until the condition isn't true..

 

if new expiry date is before the original one, I don't think there is something you can do, unless you manually end the workflow and restart..

 

a totally different approach could be to have a site workflow that checks everyday for items with expiry day = current date +3 and for each of them it sends an email..in this way you don't have any workflow waiting for a date that can change but the control is done every day..



Thank you jackgelo

in my case, the new date will be always greater than the original one, so i will go with 1st approach.

actually i like the idea for the site workflow, but never tried it before, hope you dont mind elaborate more about it.

many thanks

Badge +3

Dear jackgelo,

i tried to re-do the "pause until" again, but seems didnt work or i may missed somthing

i attached my original workflow, can you please advise where should i have to re-do the pause.

and if i redo the pause, still the variable will have its original expiry value or the updated one1548i2FA43C3854DB0543.jpg

i was trying to attach the nwf file itself, but i'm always getting the error message saying "The contents of the attachment doesn't match its file type"

Badge +3
Hi,
In my company I reviewed and re-configured all this kind of workflows by creating the scheduled site workflow as it was suggested earlier.
Main reason was the observation that a lot of workflow instances were in progress for more that 5 years and still were waiting for the 'expiration date', where some dates are configured for 10 years ahead... Not really healthy, especially if after all those years of waiting the workflow will send an email to the user who already left the company :)
With the loops is even worse. Millions records flooding nintex databases until the sizes of the tables will start cause the issues in the maintenace operations (backups/restores/moving data etc.)
Scheduled site workflows will of course also generate a lot of history and data, but it can be cleaned up easier as the workflows will be completed. Also, the time when the emails are sent will be dependent on the workflow schedule - this is quite helpful in the global company where you don't want to send the emails to Colombia by CET time zone :)

Reply