Book Image

VMware vRealize Orchestrator Cookbook

By : Daniel Langenhan
Book Image

VMware vRealize Orchestrator Cookbook

By: Daniel Langenhan

Overview of this book

Table of Contents (15 chapters)
VMware vRealize Orchestrator Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 help task

We need to create an action to help us track time. It will just log the current date and time.

  1. Create a new action and call it getNow. There is no need to define any in- or out-parameter.

  2. In the script section, place the following script:

    var current = new Date();
    System.log(current);

Using the Sleep task

  1. Create a new workflow.

  2. Drag a Sleep task onto the schema and create the SleepTime in-parameter as input for the workflow.

  3. Add the getNow action we have just created before and after the Sleep task.

  4. When running the workflow, check the log. You will notice how the workflow will wait for the allocated seconds.

Waiting for a date

  1. Create a new workflow.

  2. Drag a Wait until date task onto the schema and create the waitDate in...