Hi there,
I’ve got the following script:
when
Item Snips_Intent received update
then
var Double confid = transform("JSONPATH", "$.intent.confidenceScore", Snips_Intent.state.toString)
logInfo("snips.rule", "Confidence too low" + confid)
if (confid < 0.8) {
logInfo("snips.rule", "Confidence too low" + confid)
return
}
...
And while outputting the number works, I get the following error for the if condition:
2019-03-17 13:27:14.721 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Snips’: An error occurred during the script execution: Could not invoke method: org.eclipse.xtext.xbase.lib.DoubleExtensions.operator_lessThan(double,double) on instance: null
What am I doing wrong?