Hi -
I'm in vCO using the 6.0.1 vCO Plug-in for vCAC, trying to create a vCAC ADS resource action to run against a VC:VirtualMachine. When I manually register my action workflow in the vCAC UI, it finds the VC:VirtualMachine input parameter and maps it to an "IaaS VC VirtualMachine" resource type, and the action shows and runs correctly against VMs selected in the vCAC UI Items.
Now, in a workflow to create the resource action, I'm trying to use createResourceActionFromWorkflow() from the com.vmware.library.vcaccafe.asd.resourceaction package, which requires a vCACCAFECsResourceType (i.e. VCACCAFE:CustomResource) object. I want to point to the same "Infrastructure.Virtual" resource type which the vCAC UI uses, but I can't seem to find it in a safe fashion.
If I get a previously created VCACCAFE:ResourceAction and look at its getInputParameter().getResourceType() in a workflow, I can see an object that looks like:
[2014-08-11 16:14:50.094] [I] type.id=eaba1f37-6154-4c17-94ae-ea419cb9e14e
[2014-08-11 16:14:50.095] [I] type.name=IaaS VC VirtualMachine
[2014-08-11 16:14:50.095] [I] type.externalTypeId=Infrastructure.Virtual
[2014-08-11 16:14:50.095] [I] type.vcoType=VC:VirtualMachine
[2014-08-11 16:14:50.095] [I] type.vcoId=null
[2014-08-11 16:14:50.095] [I] type.providerId=asd.external
[2014-08-11 16:14:50.096] [I] type.tenantId=_internal
and if I do a new vCACCAFECsResourceType() and set the values (especially the id) in that object manually and use that in createResourceActionFromWorkflow(), it works. But, it doesn't feel safe to hard-code the type.id in my workflow -- will that work on other vCAC installs?
Also, I have been to get the corresponding vCACCAFEResourceType via:
vCACCAFEHost.createAdvancedDesignerClient().getAdvancedDesignerCsResourceTypeService().getResourceType('_internal', 'Infrastructure.Virtual');
but that's a different object class and I can't see how to get the corresponding vCACCAFECsResourceType.
I also tried doing a com.vmware.library.vcaccafe.asd.customresources.createCustomResourceFromInventoryType() for 'VC:VirtualMachine' and then using that vCACCAFECsResourceType to create the resource action. It creates and publishes just fine, but the action never shows in the vCAC UI (using the same entitlement as when using Infrastructure.Virtual).
Any ideas? Thanks,
Greg