Scripting with loops
Here, we will explore how to create loops in scripts. You will learn how to build loops and use them.
Getting ready
We just need a working Orchestrator, and you will need the rights to create new workflows and run them. We will work with the Orchestrator Client.
You need to understand how decisions are used in Orchestrator; this was explained in the recipe Scripting with decisions.
For the Foreach element, we will be using the example workflow 00.00 BasicWorkflow
, which is stored in the Basic Helper
folder.
How to do it...
There are several types of loop one can create; however, they can all be reduced to the following two basic types.
The decision loop
This basic kind of loop runs until a certain condition is met. We will build a ...
Get VMware vRealize Orchestrator Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.