Resource Action Object Not Correctly Passed Through to ASD Form in vCAC 6.0.x
When using the Advanced Service Designer to create Resource Actions it’s possible you may hit the following issue in vCAC 6.0.x if you attempt to access the Input Resource as part of the workflow Presentation. While everything will appear to work correctly in vCO, when the form is accessed by a vCAC user the Input Resource may not (I say *may* because the behaviour is inconsistent, sometimes it works, sometimes not!) be available to use. Take the following (contrived) example.
You would expect things to work like the following:
Using a vCO action displayToolsStatus which takes the input of a vCAC:VirtualMachine and queries vCenter for the VMware Tools Status to display in the vCAC form (unlikely you would actually want to do this, but it works for the example).
In the workflow to use as the Resource Action set the Presentation Properties of the displayToolsStatus input to the displayToolsStatus action…..
….using the vm Input as the parameter
However, when using the Resource Action, displayToolsStatus in the form is the default value Unable to determine since we hit the if (!vm) in the action
[code language=“javascript”]
if (!vm) { return null; }
[/code]
You can either upgrade to vCAC 6.1 where this is resolved, or go with the following workaround:
Add an additional input to the vCO workflow of the same type as the Resource Action input - hiddenVM in this example
Set the Presentation to be Hidden and have a Data Binding mapped to the Resource Action parameter (vm)
Now set the parameter of the displayToolsStatus action to be the hiddenVM instead of the VM input
Remove and re-add the ASD Resource action, make sure to still select the vm Input as the Input Resource
and now the form will be correctly populated.
This VMware KB post relating to a similar issue helped me get to the bottom of this.