How to Delay the Execution of a Step
Open Process Step Settings: Time and click on input field (1) to call a proper popup with formula builder (2):
Choose $Cursor as a context object and StartDate as a context object item. Place cursor into Expression field and click "Insert" button (3):
Then use date/time function (4) to create required expression (5):
In this Start Date config, we define that current step should wait 30 minutes before it becomes active (and this is {$Cursor.StartDate}).
How this works: The system changes step and the current step (the one current $Cursor object points to) is the one that should "wait" - As there is a Start Date Config, Work-Relay will put this new step (in the system it's cursor, the current step) in "On Hold" status, and it will keep this status until the job gets there and evaluates whether the time has passed and if it has, the status will be updated to "In Progress", so the step will become active.
In this Start Date configuration (6), we define that current step should "wait" 1 day before it becomes active (and this is {$Cursor.StartDate}).
For more information about date/time functions refer following article: Using Functions
As this mechanism is based on jobs, it has approximately 10 minutes of accuracy tolerance in standard conditions.
- In this example, the step will wait 2 days after the previous step has been completed before starting.
- The default number is days. You can also use HOURS(24) or MINUTES(60)
Andrew
Can we add 4 business days and exclude weekends?
Work-Relay Administrator
Hi Andrew!
Yes, you can add days using ADDDAYS function:
ADDDAYS(date/datetime, number_of_days, boolean_consider_weekends).
So expression ADDDAYS({$Cursor.StartDate}, 4, true) will delay step activation for 4 days, and it will not become active during weekends.
If your company uses Business Hours, and you need your step to become active when the business day actually starts, you can use ADDINTERVAL function:
ADDINTERVAL(datetime, interval_string, business_hours_id_optional).
So in case your company business hours setup looks like Monday to Friday 8AM to 6PM, following expression will delay step activation for 4 days, and it will become active on 8AM of the working day:
ADDINTERVAL({$Cursor.StartDate}, '4d', id_of_business_hours_record)
For more information about date/time functions refer following article: http://w-r.screenstepslive.com/s/12930/m/64195/l/672187-using-functions
Harika
How to debug the process created to know whether all steps are working
Work-Relay Administrator
Usually, this is done by performing walkthroughs of a Process in a Sandbox.