4.1

Table Of Contents
Table 2-18. Bindings of the Initializing Scriptable Task Element (Continued)
Parameter Name Binding Type
Bind to Existing
or Create
Parameter? Binding Values
vm
OUT Create
n
Local parameter: vm
n
Source parameter: vm[attribute]
n
Type: VC:VirtualMachine
n
Description:
The current virtual machine
having a snapshot taken
snapshotVmArray
OUT Create
n
Local parameter:
snapshotVmArray
n
Source parameter:
snapshotVmArray[attribute]
n
Type:
Array/VC:VirtualMachine
n
Description:
The Array of virtual
machines of which snapshots
have been taken
The Initialize scriptable task element performs the following scripted function.
//Retrieve an array of virtual machines contained in the specified Resource Pool
allVMs = resourcePool.vm;
//Initialize the size of the Array and the first VM to snapshot
if (allVMs!=null && allVMs.length!=0) {
numberOfVms = allVMs.length;
vm = allVMs[0];
} else {
numberOfVms = 0;
}
//Initialize the VM counter
vmCounter = 0;
//Initializing the array of VM snapshots
snapshotVmArray = new Array();
VMs to Process? Decision Element
The VMs to Process? decision element determines whether any virtual machines of which to take snapshots
exist in the resource pool. Table 2-19 shows the bindings that the VMs to Process? decision element requires.
Table 2-19. Bindings of the VMs to Process? Decision Element
Parameter Name Binding Type
Bind to Existing
or Create
Parameter? Binding Values
numberOfVMs
Decision Bind
n
Source parameter:
numberOfVMs[attribute]
n
Decision statement: Greater than
n
Value: 0.0
n
Description:
The number of virtual
machines found in the
resourcePool
Chapter 2 Developing Workflows
VMware, Inc. 97