Eric Patrick
Eric Patrick

Reputation: 2247

Configure a qbo3 Workflow to pause for 18 hours

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?

Upvotes: 0

Views: 21

Answers (1)

Eric Patrick
Eric Patrick

Reputation: 2247

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:

  • Create a Schedule designed to run every hour between 8am and 5pm
  • Create a Polling Step to see if 18 hours have passed

Creating the Schedule

From Configuration > Schedules, create a new schedule:

  • Schedule: Every Business Hour
  • Description: Daily repeating 1 hour between 8am and 5pm

Daily repeating 1 hour between 8am and 5pm

Create the Polling Step

From Templates > Workflows, select your workflow and choose Add a Polling Step:

  • Step: Wait 18 hours
  • With: Summary Data
  • Logic: format:dateDiff(//*[DecisionStep="Wait 18 hours"]/CreatedDate, "now", "h") >= 18
  • Polling: Every Business Hour

The key to this functionality is the format:dateDiff() function, which is calculates the hours between the CreatedDate of the Wait 18 hours step and now.

If we've passed the 18 hour mark, the Wait 18 hours will be marked complete, and any steps dependent on the Wait 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.

enter image description here

Upvotes: 0

Related Questions