VMware Cloud Community
SatishPatil
Enthusiast
Enthusiast

Advance Service Designer - form inputs

Hi All,

We have a workflow that requires few inputs(chassis, blade) manually entered by the user in a text field. We would like to minimize the data user has to enter in  textboxes. For example to add a host user has to enter converted infrastructure box( CA1 or CA2) then chassis(Chassis 1-8) and then host. This can be represented by a tree input field. All the above information( CA, Chassis, blade) can be retrieved from either a database call or an api call. How to achieve this. Any help appreciated.

Thanks

0 Kudos
1 Reply
cdecanini_
VMware Employee
VMware Employee

You can achieve this by creating vCO actions that for a given set of inputs (chassis ...) return an array of strings.

You can use either the REST / SOAP plug-ins to create the scripting that can run a request. As part of your action input parameter you should have a RESt host created with the "Add a REST HOST" workflow. For executing the request look at the scripting into "invoke a REST operation"

If you get JSON result you can do a var object = JSON.parse(result);

If the object contains an array of elements you can do something like :

var blades = new Array();

for each (var element in object) {

         blades.push(element.name);

}

return blades;

Once you have all your actions ready and tested (you can start these using a workflow) edit your master workflow to use predefined list of answers property for each input presentation (presentation tab).

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
0 Kudos