Query on FindNodeObject

Started by Nagav, February 23, 2017, 03:20:53 PM

Previous topic - Next topic

Nagav

When I try add script DCI to set Object status, I am getting following error
Script (DCI:POS_NODE_STATUS) execution error: Error 14 in line 3: Function or operation argument is not an object

Script POS_NODE_STATUS script in lib is :

pnode = FindNodeObject($node,"sw");
dciName = "IST Port status";
dciId = FindDCIByDescription(pnode, dciName);
             
dciObj = GetDCIObject(pnode, dciId);
if (dciId == null) return 0;

tableOld = GetDCIValue(pnode, dciId);
if (tableOld == null) return 0;


I try to execute first few line of above script in Transformation window for checking purpose, I noticed that FindNodeObject does not able to find object "sw", I tried same by giving object id also, but still output of script is null, I have attached screenshot of script execution result and "sw" object properties

Can you please let me know why FindNodeObject function count not find the object ?
Also can you please help me to correct above script, if it requires any change



Victor Kirhenshtein

Hi,

most likely problem caused by trusted node check. You should either add current node (where script is being executed) to list of trusted nodes on node sw, or disable trusted nodes check completely by setting server configuration parameter CheckTrustedNodes to 0 and restart server.

Best regards,
Victor