Javascript Calculator Frequency javascript.EvaluatorException

Document ID : KB000048716
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

When calling:

javascriptResultSetHelper.addMetric(metricName,


   value,       
   javascriptResultSetHelper. 
   kIntegerFluctuatingCounter,
   frequency);

If the frequency is a numeric value, the following runtime error occurs:

org.mozilla.javascript.EvaluatorException: Can't find method com.wily.introscope.server.beans.javascriptcalculator.CalculatorScript$JavascriptResultSetHelper.addMetric(string,number,number,number)

Solution:

This can be overcome by using:

javascriptResultSetHelper.addMetric(metricName,


   value,       
   javascriptResultSetHelper. 
   kIntegerFluctuatingCounter,

Packages.com.wily.introscope.spec.metric.Frequency.getFrequencyInSeconds(30));