The "Wait for Duration" action available in the Workflow Builder expands the capability and flexibility of Workflows to handle automations in a variety of scenarios. Using this action, you can now preset your workflow to pause at specific times, and for a specific duration, before continuing on to subsequent actions. This will be helpful for admins who wish to double check prior actions before proceeding, make time for manual tasks, or allow for input and confirmation from other affected users or departments.
Adding Wait Action
The "Wait for Duration" action is defined as an action that "pauses a workflow for a set number of hours or days and then resumes the workflow once that duration has expired."
This action can be found in the "THEN" section of the Workflow Builder, listed in a section specifically designated for BetterCloud actions:
When added to your workflow, you can customize this action in the "Properties" pane of the Workflow Builder, by selecting the numerical duration that the workflow should wait, and if this duration is measured in days or hours:
You'll also see a cautionary statement: "Conditions (IF) are only checked when a workflow triggers. They will not be rechecked once your workflow resumes." This means that, after a workflow pause completes and the workflow continues to subsequent actions, the original triggering conditions of the workflow will not be rechecked, and the workflow will operate under the assumption that they are still valid. Therefore, if the entities your workflow is taking action on were changed during a pause, and no longer meet the conditions set in your workflow, subsequent actions after the pause may fail to complete successfully.
"Wait for Duration" actions are supported in any action order in a workflow, including as the first or last action taken. A single workflow can also support an unlimited number of "Wait for Duration" actions. However, the cumulative total of paused time supported in a single workflow can be no more than 2 years (730 days, or 17,520 hours.)
Auditing Paused Workflows
Once a published workflow has been triggered and reaches its "Wait for Duration" action, this action will measure and begin counting down its allotted time until completion from the moment the action started.
For example, days are measured from the exact time that the "Wait for Duration" action began, rather than by calendar day: If a "Wait for Duration" action is set to pause the workflow for five days, and is triggered at 12pm on Monday, this action will complete at 12pm on Friday.
The status of a workflow's paused instances can be monitored by selecting "View Results" from the workflow's dropdown menu in the Workflow Manager:
Here, any instances that are currently paused will display the following in the "Instances" section of the workflow's results flyout tab:
1. The "Status" column will list this workflow as "WAITING", and display the number of days or hours until the pause completes.
2. An "Actions" column will provide options to stop the workflow entirely, or skip the remainder of paused time and continue on to any subsequent actions.
This information is repeated again in the workflow instances log, if you click on "View Report" to view it in a new flyout tab.
Managing Paused Workflows
From a workflow's Results flyout tab, electing to stop an existing workflow instance that is currently paused will cause the entire workflow instance to stop, skipping all subsequent actions. You'll be required to confirm this action:
If you move forward with stopping a workflow, this will be reflected in its new status, and all subsequent actions after the pause listed in its report will be listed as "Incomplete" because they did not run:
If you choose to skip the remainder of the current waiting period instead, the workflow will revert to an "In Progress" status, as it moves on to any subsequent actions:
When any remaining actions have completed, your workflow will update to display the appropriate status that represents the success or failure of your workflow as a whole.
Please note: If you choose to delete an existing workflow from within the Workflow Manager, you must first stop any instances that are currently paused.
- Conditions (IF) are only checked when a workflow first triggers. They will not be rechecked once your workflow resumes from a pause.
- A single workflow can support an unlimited number of "Wait for Duration" actions. However, the cumulative total of paused time supported in a single workflow is no more than 2 years (730 days, or 17,520 hours.)
- Paused days are measured from the exact time that the "Wait for Duration" action began, and are not measure by calendar day.
- If you choose to delete an existing workflow from within the Workflow Manager, you must first stop any instances that are currently paused.