Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect syntax with script expression #90

Open
agaldemas opened this issue Mar 14, 2018 · 1 comment
Open

incorrect syntax with script expression #90

agaldemas opened this issue Mar 14, 2018 · 1 comment

Comments

@agaldemas
Copy link

I've tried to use a script expression in a rule, using two proposed esper syntax, but both are seen with incorrect syntax by perseo-core esper engine:
time=2018-03-14T13:13:15.842Z | lvl=ERROR | corr=n/a | trans=n/a | op=refreshCore | comp=perseo-fe | srv=n/a | subsrv=n/a | msg=[object Object] error put to http://perseo-core:8080/perseo-core/rules (Incorrect syntax near 'expression' at line 1 column 35 [context ctxt$testservice$testalain expression String js:trunc(name)[trunc(name); function trunc(n) {return n.substr(n.indexOf(":" + 1));}] select *,"my_rule_update_tto" as ruleName, *,cast(cast(ev.temperature?, String),float) + 1.0 as temp, trunc(cast(ev.id?, String)) as iddev from pattern [every ev=iotEvent(cast(cast(temperature?,String),float)<5.0 and type="thing")]])

time=2018-03-14T13:23:15.875Z | lvl=ERROR | corr=n/a | trans=n/a | op=refreshCore | comp=perseo-fe | srv=n/a | subsrv=n/a | msg=[object Object] error put to http://perseo-core:8080/perseo-core/rules (Incorrect syntax near 'expression' at line 1 column 35 [context ctxt$testservice$testalain expression String js:trunc(name)[name.substr(name.indexOf(":" + 1));] select *,"my_rule_update_tto" as ruleName, *,cast(cast(ev.temperature?, String),float) + 1.0 as temp, trunc(cast(ev.id?, String)) as iddev from pattern [every ev=iotEvent(cast(cast(temperature?,String),float)<5.0 and type="thing")]])

the used esper version (5.5.0) support script expression, any idea of the issue with the syntax ?
or is it a script expression support issue ?

Thanks in advance for help or feedback on this problem

@fgalan
Copy link
Member

fgalan commented Mar 14, 2018

I'd suggest you to do an isolated test using just Esper in a small testing Java program, based in the same version (5.5.0) in order to see if the problem is related with Perseo or with Esper itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants