Enterprise Manager Beta Potential Bug

In Enterprise Manager Beta, under the action "CfgNode_GetTree", under the second ForEach Loop which builds the node tree of accesible nodes for the user, can you explain why the index starts at one instead of zero?

Also, the Set Tree node count was subtracting one from the row count for some reason.

The issue I notice is if the user has only 1 accesible node in the tree, then the query list has only one entry (at position 0) so starting the loop at index 1 never adds the item to the tree. Second, by subtracting 1 from the node count, the number of items is reported as 0. In the Enterprise OML the If block to display the tree only works if the node count is > 0

So, I believe the ForEach loop should begin at 0, and the subtracting 1 from the node count should not be done to allow a single node to work.

Am I understanding what this portion does correctly?


Hello Ken,

It is assumed that the element at position 0 in the query is the root node of the tree (the Control Panel node). You can see that the query is ordered by DeepnessLevel attribute and Control Panel node is the only one with deepness level = 0. The root node is mandatory for the good working of the tree, so this node is treated specially and is always added to the tree.

That is why the index starts at 1 instead of zero in the for each loop, and why the Set TreeNodeCount is the query ReturnedRowCount – 1.

Notice that this code is specific for EnterpriseManager and that’s why it as this assumptions.

I hope this answers your question.

Best regards,

Susete Henriques
OK. That makes sense. I was just trying to add a single item with a url reference directly under the Control Panel node, and unless I did what I described, it didn't work. Without any available documentation yet, this is really is a learn as you go experience.