I have a workflow that will be started when a person leaves a company. This wf can be started even 2 months before this person leave.
Alle the workflow tasks can be completed except one task/reminder. The person who gets this task/reminder then has to delete the home directory (not before). This MUST be done 3 days AFTER the last working day.
at the top I do a "calculate date":
Date: workflow data -> varLastWorkday
Store date in: varDeleteOrder
I send out a test email to myself with the variable varDeleteOrder. It seems to work (date is correct).
Then I tried to (I think in english it's called) "stopping until"
pause until: workflowdata -> varDeleteOrder"
Below I put the task/reminder.
I did a test WF and puted the last varLastWorkgday to November 2.2014 (today Nov.7. minus 3 days).
Unfortunately I don't recieve the task/reminder.
Do I a mistake by trying this?
Thanks in advance.
Solved! Go to Solution.
Everything sounds correct, you should be using the Pause Until the set date of varDeleteOrder. Then run the task.
Is the workflow still running "In Progress" status? Or did it error? I'm looking to see if there is an issue with pause actions in your farm. You can run a quick test on a new workflow, two actions, First one is Pause For 1 minutes, next is Log To History List, and write some data to history. Does a workflow like that finish correctly? This will rule out any issues with the farm if so.
Thanks for your answer. That is what I already did (Pause until).
The Action Log says no error:
|Anhalten bis...||10.11.2014 14:01||incomplete|
|Task Support||10.11.2014 13:42||10.11.2014 14:01||18 minutes|
The workflow stops until tomorrow 0:00 .....
|10.11.2014 14:44||Workflowkommentar||Wird bis 11.11.2014 00:00:00 angehalten|
That means it should work properly, right?
Let's see what happens tomorrow. If no success I'll make a test WF like you described.
And I'll post more after that.
Great! Also, here is some light reading that could help regardless. Workflows not continuing - Timer Service and Delays
Oh and what version of workflow are you running?
It is WF 2010.
I'll read the document behind your link.
And the good news is....IT WORKED for another time. SO I'll do some more tests. Will post it here.
Thank you very much for helping me.
asap I'll be back with final results :)
A lot to do... so I needed more time :)
FInally it works. I had problems but now they're solved.
The WF is a human ressource one and in this case it's started when a person leaves the company. Some times this WF start was started to late (later then the person really leaves....yeap, I know that is awful :)
I want that the account administrator gets a task a few days AFTER the official date when the contract ends. Now I did an "IF" the "leavingDate" is earlier than TODAY, hen send the task/message immediately. Otherwise "pause until" then send it out....
I only wanted to inform that to bring this task to an end.
BUT unfortunately I have another problem. Calculating a date. I did this and said fn.differenceDate.... Today and leavingDateIt gives me a value (for example 5)....but in this case it should be 4.
Why that does it add a day more? The Code in calculate Date is:
Should I easy peace add a "-1" at the end? Like....
I tried this and now it returns me 4.91888..... instead of 5
Have a good day
The inline function fn-DateDiffDays(start date, end date) determines the number of days between two dates. The result can be a decimal value including partial days. So if the dates are not both at 12 am, then a partial day of 4.91 can occur. Partial days can be ok in your case, in which you just need to know when greater than(or less than?) or equal to 5.