
VMware vRealize Orchestrator Cookbook
By :

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.
The Locking System doesn't need anything, as it itself is just virtual.
There are three phases to locking: locking, checking and unlocking.
We will now create a lock:
Create a new workflow and add a scriptable task.
Add the following variables as input:
Name |
Type |
Section |
Use |
|
String |
IN |
Any string |
|
String |
IN |
Any string |
Enter the following script:
LockingSystem.lockAndWait(object ,owner);
Add the workflow Display all Locks at the end.
Save and run the workflow. Enter as object any string, such as Test
and as owner or any other string such as Goofy
.
Check the logs.
We will now check if an object is locked:
Create a new workflow and add a scriptable task.
Add the following variables as input:
Name |
Type |
Section... |
Change the font size
Change margin width
Change background colour