I have been working on a Siddhi App. Inside this app I have JavaScript functions. I have found a problem when trying to use the function inside the function. Lets say:
define function sum[JavaScript ] return double {
return data[0]+ data[1];
}
define function getthesum[JavaScript] return double {
var s = sum(5,1);
return s;
}
But when I do this, "sum" is not defined appears in the logs.
The function defined here can be only used within Siddhi queries, and they cannot be used in an integrative manner with each other.
E.g you can do
from FooStream
select sum(a,b) as total
insert into BarStream;
And here the getthesum() is not correct.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With