sbeaver
Leadership
Leadership

In a older previous version....

Good day all,

Back in the day of vcac when we were using the lifecycle workflows stubs for the different phases we used to get a few different object types sent over and usually something like the below code received the data.  Ok so here is the question, now that the subscriptions are sending the "payload" to the workflows can you still get VCAC:VM and the VC:VM directly from the payload without searching through the plugin objects?  I was hoping that info might be in there somewhere but I am not seeing it.  I know we get the "ExternalReference: vm-119810" which is the vm-id but is searching the only option?

System.log("Workflow started from workflow stub " + externalWFStub + " on vCAC host " + vCACHost.displayName);

System.log("Got vCAC virtual machine " + vCACVm.virtualMachineName);

System.log("Matching virtual machine entity " + virtualMachineEntity.keyString);

System.log("Got vCAC virtual machine ID " + vCACVm.virtualMachineID);

var machineId = vCACVm.virtualMachineID

if (vCenterVm != null) {

  System.log("Got vCloud VM " + vCenterVm.name);

}

Thanks and Cheers!

Steve Beaver
VMware Communities User Moderator
VMware vExpert 2009 - 2020
VMware NSX vExpert - 2019 - 2020
====
Co-Author of "VMware ESX Essentials in the Virtual Data Center"
(ISBN:1420070274) from Auerbach
Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/]
Come follow me on twitter http://www.twitter.com/sbeaver

**The Cloud is a journey, not a project.**
0 Kudos
0 Replies