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

Reference not allowed for not occurring events' Stream #1427

Open
dj13may91 opened this issue Jul 31, 2019 · 2 comments
Open

Reference not allowed for not occurring events' Stream #1427

dj13may91 opened this issue Jul 31, 2019 · 2 comments

Comments

@dj13may91
Copy link

dj13may91 commented Jul 31, 2019

Description:
Referencing is allowed for streams query under non occurring pattern

Affected Siddhi Version: 5.*

Steps to reproduce:
from every e1=TempStream[e1.roomNo == 1] → not TempStream[roomNo == 99 or deviceID == 10] for 5 min → e2=TempStream[e2.roomNo == 5] within 60 minutes

Here bold marked TempStream can't be referenced. Below query will result in error:
from every e1=TempStream[e2.roomNo == 1] → not e3=TempStream[roomNo == 99 or deviceID == 10] for 5 min → e2=TempStream[e2.roomNo == 5] within 60 minutes

@dj13may91 dj13may91 changed the title Reference not allowed for not occurring events Reference not allowed for not occurring events' Stream Jul 31, 2019
@mohanvive
Copy link
Contributor

@dj13may91 I have tested a similar query and it works fine (BTW, using alias 'e2' within the first pattern state is not correct) . States are sequential in a pattern query.

from every e1=TempStream[roomNo == 1] → not e3=TempStream[roomNo == 99 or deviceID == 10] for 5 min → e2=TempStream[e2.roomNo == 5] within 60 minutes

Can you please let us know what is your use case?
What is error that you got?

@dj13may91
Copy link
Author

@mohanvine
Ya that e2 in first block was a copy paste mistake. But other than that the use case doesn't work when referencing a non occurring pattern.
Although, i got the logic that even if i get the reference what will i use it for as there is nothing happening in that particular reference stream .

@mohanvive mohanvive self-assigned this Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants