I have two tasks in a qbo3 Workflow that need to be performed at least 18 hours apart, but only during business hours (8am to 5pm):
- Task A
- (pause for 18 hours)
- Task B
Can Step 2 above be configured to do this?
I have two tasks in a qbo3 Workflow that need to be performed at least 18 hours apart, but only during business hours (8am to 5pm):
Can Step 2 above be configured to do this?
You should use a
Polling Step
to do this. Polling steps run on a schedule, and evaluate data conditions until the condition is true. To meet your requirement:Schedule
designed to run every hour between 8am and 5pmPolling Step
to see if 18 hours have passedCreating the Schedule
From
Configuration > Schedules
, create a new schedule:Every Business Hour
Daily repeating 1 hour between 8am and 5pm
Create the Polling Step
From
Templates > Workflows
, select your workflow and chooseAdd a Polling Step
:Wait 18 hours
Summary Data
format:dateDiff(//*[DecisionStep="Wait 18 hours"]/CreatedDate, "now", "h") >= 18
Every Business Hour
The key to this functionality is the
format:dateDiff()
function, which is calculates the hours between theCreatedDate
of theWait 18 hours
step andnow
.If we've passed the 18 hour mark, the
Wait 18 hours
will be marked complete, and any steps dependent on theWait 18 hours
step will be started.If we've not yet passed the 18 hour mark, the
Every Business Hour
schedule will queue the step to be evaluated again in an hour. If this hour happens to be after business hours, the schedule will advance the next run date to the following morning @ 8am.