VMware Cloud Community
David788
Contributor
Contributor

not able to transfer array of Properties between workflow items, while running workflow in Debug mode

Hello All,

I'm building vRO workflow to deploy VM, based on vRO 7.3.

For multiple times I've to go through Arrays of objects like everybody have to. My decision was to have it in graphical loops, even if those are not time efficient, but it is my way.

For getting random object from Array I'm using: Array.pop() function, which will get me one object and remove this object from current Array, which is exactly what I want in "foreach loop".

Everything was working fine except I've got to the point of listing vSphere portgroups (standard switch based) from ESXi host, while checking if particular VLAN is already configured on ESXi host.

When I run workflow without Debug mode all is good, but while running workflow in Debug mode I'm getting "null" out of Array, which actually contains all my needed data.

Workflow description:

1. Get ESXi cluster

2. pop one ESXi host

3. "Get Portgroups" from this ESXi host and outpiting it to workflow array/Properties allReadedPortGroups:

     Input:

     pastedImage_54.png

     Script:

     allReadedPortGroups = oneESXihost.configManager.networkSystem.networkConfig.portgroup;

    

     Output:

     pastedImage_55.png

4. Running foreach graphical loop by custom decision "More PortGroups":

     Input:

     pastedImage_57.png

     Script:

     System.debug("More portgroups item: " + allReadedPortGroups);

     if (allReadedPortGroups.length > 0)

          {

          return true;

          }

     else

          {

          return false;

          }

While running without debug mode, debug log will output to log whole array containing e.g.: 50 objects with all information which I need.

While Running workflow in Debug mode, debug log will output the same amount of objects e.g.: 50, but objects are empty.

This means, that in next step:

5. "pop portgroup":

     Input:

     pastedImage_60.png

     Script:

     var onePortGroup = allReadedPortGroups.pop();

     Output:

     pastedImage_65.png

Will just return "null" to onePortGroup workflow attribute and all my checks are useless.

pastedImage_52.png

Does anybody saw this behaviour ?

Reply
0 Kudos
0 Replies