VMware Cloud Community
Carolous
Contributor
Contributor
Jump to solution

VC:VirtualMachine to Array/VC:VritualMachine?

As part of a vRealize Orchestrator workflow we use to deploy servers i'd like add "Add a virtual machine to DRS group"  to the rest of the deployment workflow, however it takes Array/VC:VirtualMachine as input and the resulting output from cloning a VM is VC:VirtualMachine.

Is there a way to change the VC:/VirtualMachine to Array/VC:VirtualMachine?

0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

There is no direct visual binding between a singular object and an array of objects.

What you can do is to perform this conversion with little scripting. Add a workflow attribute of type Array/VC:VirtualMachine and a scriptable task item, then in this item add scripting code to take the singular virtual machine object, convert it to array and store it in the array attribute. Then, bind this array attribute to the corresponding input parameter of workflow "Add a virtual machine to DRS group".

View solution in original post

0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

There is no direct visual binding between a singular object and an array of objects.

What you can do is to perform this conversion with little scripting. Add a workflow attribute of type Array/VC:VirtualMachine and a scriptable task item, then in this item add scripting code to take the singular virtual machine object, convert it to array and store it in the array attribute. Then, bind this array attribute to the corresponding input parameter of workflow "Add a virtual machine to DRS group".

0 Kudos
Carolous
Contributor
Contributor
Jump to solution

Thank you, got the workflow running now!

0 Kudos