This is a recipe that will make you wait for it…
There are two different kinds of wait tasks—tasks that wait for a duration and tasks that wait for a specific date and time until they proceed.
We need to create an action to help us track time. It will just log the current date and time.
Create a new action and call it
getNow
. There is no need to define any in- or out-parameter.In the script section, place the following script:
var current = new Date(); System.log(current);
Drag a Sleep task onto the schema and create the SleepTime in-parameter as input for the workflow.
Add the getNow action we have just created before and after the Sleep task.
When running the workflow, check the log. You will notice how the workflow will wait for the allocated seconds.