VMware Aria Automation forms and complex/composite types

April 27, 2024 0 By Allan Kjaer

I have a colleague that had a problem with using the multi value picker in a form for a XaaS service workflow.

The case was that we need to have a list of string a use the “multi value picker” for the user to select some stings that the workflow needed.

This did not work as expected, so I have done some research to find a solution and decided to do a blog about how to do this in a simple way.

The workflow:

Input for the workflow is a “Array” of a “Composite Type” this looks like this:

The Composite type looks like this: “Array/CompositeType(label:string):textline” and is created like this:

The “Composite Type” in this example only have one field called “label” of the type “string”.

Just to demonstrate that this work and how to access the data in the composite type, i created this script:

This just displays the data in the log.

Then we need a Aria Automation Orchestrator “Action” to get some data into the form, that the user can select from.

I have just used simple one for this example, where the “Return type” is the same Composite Type we created for the workflow.

var array1 = new Array("string1","string2","string2","text1","text2","text3","myname1","myname2","myname3");

var result = new Array();

for each (textLine in array1) {
    if (textLine.toLowerCase().indexOf(searchString.toLowerCase()) != -1 || !searchString) {
        var obj = new Object()
        obj.label = textLine;
        result.push(obj);
    }
}
return result;

In the form the configuration looks like this:

And the configuration of the values tab:

we have the External Action “getCompositeStringsForMVP” that we create earlier, we are using the “Search Term” to filter the list, and configure Columns Label to “label” this was the name of “string” in the composite type.

doing a “request” on the XaaS looks like this.

And the “Show all…” also works like expected.

Please share this page if you find it usefull: