View Issue Details

IDProjectCategoryView StatusLast Update
0005647Compliance Test Tool (CTT) Unified Architecture1 - Script Issuepublic2020-05-28 15:38
ReporterMatti Siponen Assigned ToAlexander Allmendinger  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.04.09.394 
Target Version1.04.09.396Fixed in Version1.03.341.396 
Summary0005647: Data Access / Data Access Semantic Changes / 016.js and 017.js attempt to call CreateMonitoredItems with an empty array
Description

These test scripts attempt to call CreateMonitoredItems with empty arrays in ItemsToCreate parameter, which causes an unexpected Bad_NothingToDo Exception causing the tests to be aborted with errors.

This also effects CTT version 1.04.09.395

Additional Information

These scripts can be fixed by replacing the following lines of code on line 30 in both 016.js and 017.js

for( var i=0; i<TranslateBrowsePathsToNodeIdsHelper.Response.Results.length; i++ ) {
var thisResult = TranslateBrowsePathsToNodeIdsHelper.Response.Results[i]; // get this result to a variable for easier access
if( thisResult.StatusCode.isGood() ) { // we only care about GOOD results
if( thisResult.Targets.length > 0 ) { // we only care if results were found
for( var t=0; t<thisResult.Targets.length; t++ ) { // iterate thru all targets; we only want the first
if( thisResult.Targets[t].TargetId.ServerIndex === 0 ) { // node is in this server?
propertyNodes.push( MonitoredItem.fromNodeIds( [ thisResult.Targets[t].TargetId.NodeId ] )[0] ); // use this target to test with
}//in this server?
}//for t...
}//targets > 0?
}//is good?
}//for i...

with the following lines of code

for( var i=0; i<TranslateBrowsePathsToNodeIdsHelper.Response.Results.length; i++ ) {
var thisResult = TranslateBrowsePathsToNodeIdsHelper.Response.Results[i]; // get this result to a variable for easier access
if( thisResult.StatusCode.isGood() ) { // we only care about GOOD results
if( thisResult.Targets.length > 0 ) { // we only care if results were found
for( var t=0; t<thisResult.Targets.length; t++ ) { // iterate thru all targets; we only want the first
if( thisResult.Targets[t].TargetId.ServerIndex === 0 ) { // node is in this server?
propertyNodes.push( MonitoredItem.fromNodeIds( [ thisResult.Targets[t].TargetId.NodeId ] )[0] ); // use this target to test with
}//in this server?
}//for t...
analogNodes.push( MonitoredItem.fromNodeIds( [ TranslateBrowsePathsToNodeIdsHelper.Request.BrowsePaths[i].StartingNode] )[0] );// save the analog node for monitoring
}//targets > 0?
}//is good?
}//for i...

TagsNo tags attached.
Files Affected

Activities

Alexander Allmendinger

2020-05-27 12:24

developer   ~0012119

The script was missing to add the analogNode but was only adding the properties. As a result the analogNodes stayed an empty list and when the analogNodes were passed in the CreateMonitoredItems call, it was calling that service with an empty array.

Now the analogNodes are assigned after checking the properties so they can be created.

Paul Hunkar

2020-05-28 15:38

administrator   ~0012138

reviewed in CMP call

Issue History

Date Modified Username Field Change
2020-05-14 11:29 Matti Siponen New Issue
2020-05-15 17:47 Paul Hunkar Assigned To => Alexander Allmendinger
2020-05-15 17:47 Paul Hunkar Status new => assigned
2020-05-27 12:24 Alexander Allmendinger Status assigned => resolved
2020-05-27 12:24 Alexander Allmendinger Resolution open => fixed
2020-05-27 12:24 Alexander Allmendinger Fixed in Version => 1.03.341.396
2020-05-27 12:24 Alexander Allmendinger Note Added: 0012119
2020-05-28 15:38 Paul Hunkar Target Version => 1.04.09.396
2020-05-28 15:38 Paul Hunkar Status resolved => closed
2020-05-28 15:38 Paul Hunkar Note Added: 0012138