Wait Node
๐ฏ Purposeโ
Delays workflow execution for a specified duration. This allows for throttling and synchronization before continuing to the next node.
๐ฅ Inputsโ
-
Duration โ A numeric value indicating how long to wait.
-
Unit โ A dropdown selection specifying the time scale:
- Milliseconds
- Seconds
- Minutes
๐ค Outputsโ
- Passes on its input to the next node after waiting the specified amound of time. No data is transformed or generated. The output simply continues workflow execution after the pause.
๐ Best Practicesโ
- Use Short Delays When Testing: Long waits can make debugging slower.
- Avoid Unnecessary Pauses: Only insert waits where timing control is required.
- Combine With External Checks: Use the Wait Node before polling APIs or checking for file availability.
๐งช Test Casesโ
- Given:
Duration Value = 500,Time Unit = millisecondsExpected: Workflow resumes after 0.5 seconds. - Given:
Duration Value = 5,Time Unit = secondsExpected: Workflow resumes after 5 seconds. - Given:
Duration Value = 1,Time Unit = minutesExpected: Workflow resumes after 60 seconds. - Given: Invalid or negative duration Expected: Error: invalid wait duration
๐๏ธ Real-World Use Casesโ
- Rate Limiting: Prevent exceeding API rate limits between requests.
- Synchronization: Ensure external services complete actions before the next node runs.
- Timed Triggers: Delay execution to align with scheduled processes or intervals.
โ Step-by-Step (Quick Start)โ
- Add Wait Node to your workflow.
- Enter a numeric value in Duration.
- Select a time unit from the Unit dropdown.
- Connect the Wait Node to the next step in your workflow.
- Run the workflow and verify that it resumes after the specified duration.
- Save and deploy.