Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

vCO REST: Array of Numbers

$
0
0

I've been struggling with this one for longer than I care to admit.

 

I have a simple workflow that just takes an input array and logs the contents.  An array "hello world" if you will:

 

for each (var thing in myvar) {
  System.log("Thing: "+thing);

}

 

When using an Array/string type for myvar, this XML section passed via the REST API works perfectly:

 

    <vco:parameter name="myvar" type="vco:array">

      <vco:array>

        <vco:string>"5.0"</vco:string>

        <vco:string>"10.0"</vco:string>

      </vco:array>

    </vco:parameter>

However, when changing the input array type to Array/number, the XML below is accepted and the workflow runs but the array elements consistently appear as "not entered" or "null":

    <vco:parameter name="myvar" type="vco:array">

      <vco:array>

        <vco:number>"5.0"</vco:number>

        <vco:number>"10.0"</vco:number>

      </vco:array>

    </vco:parameter>

I've tried various permutations of sindle/double/no quotes, inline value attributes, etc, all to no avail.  I saw that when running the workflow via the vCO UI the value was logged as name=myvar, type=Array/number, value=#{#number#5.0#;#number#10.0#}# but various permutations of this form...

 

  <vco:parameters>
    <vco:parameter name="myvar" type="vco:array">#{#number#325.0#;#number#215.0#}#</vco:parameter>
  </vco:parameters>


... still return "not entered".  The doc at https://<vco>/api/docs/el_vco_execution-context.html don't seem to indicate any special handling requirements for an array of numbers, but I'm apparently missing something fundamental.

 

Any tips/pointers/recommendations greatly appreciated!

 

Thanks!


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>