Book Image

VMware vRealize Orchestrator Essentials

By : Daniel Langenhan
Book Image

VMware vRealize Orchestrator Essentials

By: Daniel Langenhan

Overview of this book

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

Summary


This chapter introduced you to JavaScript and how you can integrate it into Orchestrator. You learned how to use the scriptable task and the action element to directly write JavaScript code into your workflow.

We learned how to use the if-clause and what conditions are and how to form them. We also had a look at some of the common string problems that one may encounter.

In the next chapter, we will use presentation to improve user experience and reduce input errors.

Correct answers

Check whether mySecondValue equals Hello:

if (mySecondValue=="Hello") {
  myOutput="Well Helllo";
} else {
  myOutput="no hello";
}

Check both the conditions:

if ((myFirstValue>5)&&(mySecondValue=="Hello")) {
  myOutput="Well Helllo, its bigger than 5";
} else {
  myOutput="no hello and smaler then 5";
}