Hello,
I am new to vCO and Java Script and I was wondering if I could call an action in a scriptable task. Basically I am creating a workflow that is integrating with vCAC and I want to pull the properties from the Virtual Machine and change the varible names to invoke a soap request for another service. I see that in the plugin there is getPropertieFromVirutalMachine can I call that action in my scriptable task to do an update in my scritpable task to reset the varibles? Essintally I want to know if I could do something like this:
(I know that this doesnt work)
var properties = new Properties();
properties.put("VirtualMachineID", virtualMachine.virtualMachineID);
var vmProperties = {
applicationResolver = getPropertyFromVirtualMacine(host, virtualMachine, "property");
};
System.log(applicationResolver)
or do I have to do it another way by going through the vCAC entities
var prop = System.getModule("com.vmware.library.vcac").getPropertyFromVirtualMachine(host,virtualMachine,propertyName) ;
Yes you can.
To get the syntax just drag and drop the action on your schema and copy and paste the script in the script tab of the action into your scriptable task.
The two first lines are not used for calling the action.
var prop = System.getModule("com.vmware.library.vcac").getPropertyFromVirtualMachine(host,virtualMachine,propertyName) ;
Ahhh cool thank you so much!!!! That will save me so much