I am not even sure if that makes sense. Hope that it is clear. What I would like to accomplish is have a predefined array of VMs. I am assuming that this can be an attribute that I create as Name - vmsList with a type of ArrayVC:VirtualMachine. I would then populate the array with the VMs I would like to select from. I would also think I would create another attribute called selectedVMs. This would also be an ArrayVC:VirtualMachine. I would like to be able to be presented with the vmsList array and select the VMs I want and it be populated to selectedVMs array. I am guessing that I am just missing the middle part. Any help would be appreciated. Thanks
Yes, this can be done.
Add an input parameter to your workflow, let's say parameter with name arg_in, of type Array/VC:VirtualMachine. Go to presentation tab in the vRO client, select this input parameter, and add the property Predefined list of elements with a value #vmList. This will limit to set of VMs you can choose from when you start the workflow presentation to those available in the vmList attribute.
Then, you'll need to copy the list of VMs selected by the user at runtime to the selectedVMs attribute. To do so, add a new scriptable task to your workflow, add arg_in input parameter on IN tab, add selectedVMs attribute on OUT tab, and inside the scriptable task, add the following code:
selectedVMs = arg_in;
Yes, this can be done.
Add an input parameter to your workflow, let's say parameter with name arg_in, of type Array/VC:VirtualMachine. Go to presentation tab in the vRO client, select this input parameter, and add the property Predefined list of elements with a value #vmList. This will limit to set of VMs you can choose from when you start the workflow presentation to those available in the vmList attribute.
Then, you'll need to copy the list of VMs selected by the user at runtime to the selectedVMs attribute. To do so, add a new scriptable task to your workflow, add arg_in input parameter on IN tab, add selectedVMs attribute on OUT tab, and inside the scriptable task, add the following code:
selectedVMs = arg_in;
I am going to take a shot at this without having my computer in front of me...
I believe you are going to have the best results by really taking advantage of the presentation layer of vRO.
If you are using the vCheck workflows, i am going to recommend using part of that process. There is a helper workflow called vSphereObjects. What this workflow does is it gathers up different arrays of information like all virtual machines, all host systems, all vCenter servers, datastores and such and stores that information in a Configuration Element.So lets say you have a vmList attribute of an array of VC:VcVirtualMachineP
In your new workflow you have an input parameter of selectedVMs that is an array of VC:VcVirtualMachine and in the presentation tab you configure a "Predefined answers" that list all the vm's iin the configuration element. While your at it you can also other Properties like "Allow same values" :No so you don't add duplicate values.
I think this should help get you started with what you are looking to do.
Cheers!!
Steve
I am sure that both of these would have worked, but I just happened to get to this suggestion first and it worked like a champ.