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

Temporal rules does not work after restart #411

Closed
manucarrace opened this issue Nov 8, 2019 · 4 comments
Closed

Temporal rules does not work after restart #411

manucarrace opened this issue Nov 8, 2019 · 4 comments
Labels

Comments

@manucarrace
Copy link
Collaborator

In the event of a restart, the temporal rules stop working.

It is also known that temporal rules need a context started (or active) to work, that means that a initial foo notification must be sent.

Both problems are related. We should avoid initial notification or send automatically these initial notifications in case of restart or new time-rule provision.

@manucarrace
Copy link
Collaborator Author

manucarrace commented Nov 8, 2019

Example of temporal rule:

{
	"name":"Timer_example",
	"text":"select *, current_timestamp.toDate() as currentTS from pattern [every timer:interval(10 sec)]",
	"action": {
		"type":"update",
		"parameters":{
			"id":"timer_example_min_2",
			"type": "ww",
			"attributes": [
				{
					"name":"timestamp",
					"type": "Text",
					"value": "${currentTS}"
				}
			]
		}
	}
}

@fgalan
Copy link
Member

fgalan commented Nov 8, 2019

@cblanco @aarranz you did some modifications in Perseo Core related with time rules in the past (PR telefonicaid/perseo-core#114). What do you think about this? Any idea?

@fgalan fgalan added the bug label Nov 8, 2019
@manucarrace
Copy link
Collaborator Author

manucarrace commented Nov 8, 2019

Using the ESPER simulator:

If we include the time-rule in a partitioned context it does not work:

Captura de pantalla 2019-11-08 a las 13 08 21

If then, we stimulate with an event, then it works:

Captura de pantalla 2019-11-08 a las 13 08 59

Creating a specific context for time-rules seems to work without any further context activation. This could be the solution:

Captura de pantalla 2019-11-08 a las 13 08 02

@fgalan
Copy link
Member

fgalan commented Nov 26, 2019

Fixed in PR #415

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

No branches or pull requests

3 participants