Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
VMware vRealize Orchestrator Cookbook. - Second Edition

You're reading from  VMware vRealize Orchestrator Cookbook. - Second Edition

Product type Book
Published in Nov 2016
Publisher Packt
ISBN-13 9781786462787
Pages 556 pages
Edition 2nd Edition
Languages
Author (1):
Daniel Langenhan Daniel Langenhan
Profile icon Daniel Langenhan

Table of Contents (19) Chapters

VMware vRealize Orchestrator Cookbook Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Installing and Configuring Orchestrator 2. Optimizing Orchestrator Configuration 3. Distributed Design 4. Programming Skills 5. Visual Programming 6. Advanced Programming 7. Interacting with Orchestrator 8. Better Workflows and Optimized Working 9. Essential Plugins 10. Built-in Plugins 11. Additional Plugins 12. Working with vSphere 13. Working with vRealize Automation

Using the Locking System


Here we will have a look at the Locking System. We will learn how to lock and unlock objects using locks. Locks are used to make sure objects are only used by one owner.

Getting ready

The Locking System doesn't need anything, as it itself is just virtual.

How to do it...

There are three phases to locking: locking, checking and unlocking.

Create a lock

We will now create a lock:

  1. Create a new workflow and add a scriptable task.

  2. Add the following variables as input:

    Name

    Type

    Section

    Use

    object

    String

    IN

    Any string

    owner

    String

    IN

    Any string

  3. Enter the following script:

    LockingSystem.lockAndWait(object ,owner); 
    
  4. Add the workflow Display all Locks at the end.

  5. Save and run the workflow. Enter as object any string, such as Test and as owner or any other string such as Goofy.

  6. Check the logs.

Check for lock

We will now check if an object is locked:

  1. Create a new workflow and add a scriptable task.

  2. Add the following variables as input:

    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 $15.99/month. Cancel anytime}

    Name

    Type

    Section...