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

Problem passing an array of object between 2 different workflow in vco 7.3 (work in 6.0.0.3)

$
0
0

I'm trying to use the NetApp wfa plugin for vco on a vco 7.3 (vrealize embedded one) and I have problems passing parameters to netapp workflow.

After doing some tests I've saw that the plugin work correctly with a standalone vco 6.0.0.3 and trying to understand what is not working it seems that the problem is that one workflow call another workflow passing an array of object and the called workflow cannot see the "value" passed (it see the number of elements in the array but not the element values).

 

To simulate the behavious I've created 2 workflow.

 

First workflow (testcall) accept 2 parameters p1 and p2 (in testrun i assign p1='p1val' and p2='p2val'). This workflow has a script that create an array of string and an array ov vcOptionValue (to have a key/value pairing) and then call the second workflow.

 

Workflow:

Workflow input parameters:

Script Binding:

Workflow Binding:

 

This is the script in the first workflow:

System.log("Starting the workflow")
System.log(" Assigning inputs to key/value pairs");

var out = new Array();
var out2 = new Array();

var x = new VcOptionValue();
x.key = "p1";
x.value = p1;
out.push(x);
out2.push(p1)

var x = new VcOptionValue();
x.key = "p2";
x.value = p2;
out.push(x);
out2.push(p2)

for (var i in out) {
  System.debug("OUT    " + i + " " + out[i].key + " = " + out[i].value);
}
for (var i in out2) {  System.debug("OUT2    " + i + " " + out2[i]);
}

 

The second workflow (testcalled) just get those input parameters and print them.

 

Workflow:

Workflow input:

Script Binding:

 

Script:

System.debug("TEST1_v1:    " + v1 );
System.debug("TEST1_v2:    " + v2);

for (var i in t) {
     System.debug("TEST1_t:    " + t[i].key + " = " + t[i].value);
}

for (var i in a) {
     System.debug("TEST1_a:    " + a[i]);
}

 

 

 

This is the output of the workflow run on vco 7.3

[2017-06-22 11:08:58.574] [I] Starting the workflow
[2017-06-22 11:08:58.575] [I]  Assigning inputs to key/value pairs
[2017-06-22 11:08:58.576] [D] OUT    0 p1 = p1val
[2017-06-22 11:08:58.577] [D] OUT    1 p2 = p2val
[2017-06-22 11:08:58.578] [D] OUT2    0 p1val
[2017-06-22 11:08:58.579] [D] OUT2    1 p2val
[2017-06-22 11:08:58.595] [D] TEST1_v1:    p1val
[2017-06-22 11:08:58.596] [D] TEST1_v2:    p2val
[2017-06-22 11:08:58.598] [D] TEST1_t:    undefined = undefined
[2017-06-22 11:08:58.600] [D] TEST1_t:    undefined = undefined
[2017-06-22 11:08:58.601] [D] TEST1_a:    p1val
[2017-06-22 11:08:58.602] [D] TEST1_a:    p2val

This is the output on the exported from 7.3/imported on 6.0 workflow run on vco 6.0

[2017-06-22 10:53:19.915] [I] Starting the workflow
[2017-06-22 10:53:19.915] [I]  Assigning inputs to key/value pairs
[2017-06-22 10:53:19.916] [D] OUT    0 p1 = p1val
[2017-06-22 10:53:19.916] [D] OUT    1 p2 = p2val
[2017-06-22 10:53:19.916] [D] OUT2    0 p1val
[2017-06-22 10:53:19.916] [D] OUT2    1 p2val
[2017-06-22 10:53:20.150] [D] TEST1_v1:    p1val
[2017-06-22 10:53:20.150] [D] TEST1_v2:    p2val
[2017-06-22 10:53:20.151] [D] TEST1_t:    p1 = p1val
[2017-06-22 10:53:20.151] [D] TEST1_t:    p2 = p2val
[2017-06-22 10:53:20.151] [D] TEST1_a:    p1val
[2017-06-22 10:53:20.151] [D] TEST1_a:    p2val

 

What I'm doing wrong? It seems that between 6.0 and 7.3 the behaviour of passing array of object is somewhat changed (at least for VcOptionValue). Can I use other object/type to make this work correctly?


Viewing all articles
Browse latest Browse all 6251

Trending Articles



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