- 01 Dec 2021
- 2 Minutes to read
- Print
- DarkLight
Using the Pause Flow Step
- Updated on 01 Dec 2021
- 2 Minutes to read
- Print
- DarkLight
Overview
The Pause Flow step delays processing the next step of a Flow until a specific DateTime value, or until a time duration has elapsed. This can be useful when dealing with processes that require additional users to interact with them, or that require additional information and elements to proceed.
Example
This example flow will add a Pause Flow step in between the Start and End step.
- From a Designer Folder, select CREATE FLOW from the Global Action Bar, then CREATE a new Flow.
- Drag a Pause Flow step, from the Flow Management section in the Steps panel to the workspace and connect the paths.
- Select the Pause Flow step to navigate to its Properties tab.
- Specify the DateTime value to indicate when the Flow will pause via ResumeWhen under Inputs.Additional Information on Mapping TypesThere are different DateTime-specific Mapping Types to choose from to build a time that the Flow will pause for.
Constant Date Used when the date is the same throughout the process, will allow manual selection of the date. Constant date and Time Used when the date and time are the same throughout the process, will allow manual selection of the date and time. Select From Flow If a DateTime Data Type is available in the flow it can be selected here. Computer Date Use to create a specific date dynamic to the process. Current Date Time Will set the Resume When Input to the Current Date and Time, not pausing the Flow at all. - Set the Resume When mapping to Compute Date.
- From the newly displayed Resume When dropdown menu, select InFuture.
- Leave Start as Current Date Time.
- Constant map the Offset value to 5 seconds.Additional InformationThe Offset value is used to determine the Resume time by offsetting the Start value by the configured DateTime value.
Save the Flow, then Close if desired.
Debug
- From the Flow Designer, select the Debug link on the top Action Bar.
- Select FULL; observe that that Flow pauses after starting and resumes 5 seconds later.
Flow Behavior
Note that the Pause Flow Step causes the Flow to switch from its current Behavior to Asynchronous Behavior. During this Paused State, the Decisions environment may conduct additional processes or data may be changed. This means that data that occurs prior to the Pause Flow Step may be lost of change.
To avoid this issue, it helps to utilize a Create Data step as means of recording the Data (such as the Current User Data). To do so:
- From the Flow Designer, add a Create Data step from Steps > Favorite Steps before the Pause Flow step.
- From the Properties tab of the Create Data step, under Default > Flow Input Data, select Show Editor.
- From the Data Definitions window, provide a Name, select the desired Type (for this example String [Text]), then CLOSE the window.
- Under Create Data > Properties > Inputs, set the Data's mapping to Select From Flow. Then, map Flow Data.CurrentUserEmail to the Input.
- Save the Flow, then select the Debug link from the top Action bar. Then, select FULL.
- After the Flow runs, select Create Data 1 > Execution 1 > View Output Data to ensure that the Current User Email mapped properly to the Create Data step.
Delay Next Step
As an alternate method to the Pause Flow step, the Delay Next Step allows users to pause (or as the next suggests "delay") the execution of a step. The step operates similarly to the Pause Flow step in that but differs in that it does not place the Flow in a Stored Workflow State. Additionally the amount of Time the step waits can only be defined in Seconds.