Waiting tasks
This is a recipe that will make you wait for it...
Getting ready
We need a new workflow and time!
How to do 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.
Creating a help task
We need to create an action to help us track time. It will just log the current date and time. The action already exists in the action
folder com.packtpub.Orchestrator-Cookbook2ndEdition.helpers
:
Create a new action and call it
getNow
. There is no need to define any in- or out-parameters.In the script section, place the following script:
var current = new Date(); System.log(current);
Using the Sleep task
Create a new workflow.
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...