Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
VMware vRealize Orchestrator Cookbook

You're reading from   VMware vRealize Orchestrator Cookbook Master the configuration, programming, and interaction of plugins with Orchestrator to efficiently automate your VMware infrastructure

Arrow left icon
Product type Paperback
Published in Feb 2015
Publisher
ISBN-13 9781784392246
Length 382 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Daniel Langenhan Daniel Langenhan
Author Profile Icon Daniel Langenhan
Daniel Langenhan
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Installing and Configuring Orchestrator FREE CHAPTER 2. Optimizing Orchestrator Configuration 3. Visual Programming 4. Working with Plugins 5. Basic Orchestrator Operations 6. Advanced Operations 7. Working with VMware Infrastructure Index

Error handling in workflows

This recipe is dedicated to show how to handle errors in workflows. We will learn how to catch errors and redirect 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.

How to do it...

  1. Create a new workflow. We will reuse this workflow in the Resuming failed workflows recipe in this chapter.
  2. Add the following variables:

    Name

    Type

    Section

    Use

    number

    Number

    IN

    Used to create an intentional error

  3. Assemble the workflow (as seen in the following screenshot) by dragging a scriptable task into the workflow and then a Throw exception element from the generic section onto the scriptable task. Add the two log elements to the workflow by just dropping them onto the lines.
    How to do it...
  4. Bind the in-parameter to the scriptable task and add the following script that will throw an error when the value 5 is entered:
    if (Number==5) {
        throw "Intentional Error";
    }
  5. In...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image