Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
HD-Chapter:IoT
-
HD-Enabler:Cepheus
Description
Created question in FIWARE Q/A platform on 03-01-2018 at 17:01
Please, ANSWER this question AT https://stackoverflow.com/questions/48081808/insert-a-rule-in-cepheus-cep-while-running
Question:
Insert a rule in Cepheus-CEP while running
Description:
I am starting to explore Fiware tools and I am testing Cepheus-CEP.
I know I can set rules and other configuration parameters in the "config.json" file that Cepheus take when I launch the service, but I don't know how to especify these rules on execution time.
For example, a "config.json" could be:
{
"host":"http://localhost:8080",
"in":[
{
"id":"RoomX",
"type":"Room",
"attributes":[
,
{ "name":"shutter", "type":"string" } ]
}
],
"out":[
{
"id":"ShutterX",
"type":"Shutter",
"attributes":[
]
}
],
"statements":[
"INSERT INTO Shutter SELECT R.r.shutter as id, 'closed' as status FROM pattern [ every r=Room(temperature > 26.0) -> (timer:interval(5 sec) and not Room(temperature < 26.0 and id=r.id))] as R unidirectional LEFT OUTER JOIN Shutter.std:groupwin(id).std:lastevent() as S ON R.r.shutter = S.id WHERE S is null OR S.status = 'opened'",
"INSERT INTO Shutter SELECT R.r.shutter as id, 'opened' as status FROM pattern [ every r=Room(temperature < 24.0) -> (timer:interval(5 sec) and not Room(temperature > 24.0 and id=r.id))] as R unidirectional LEFT OUTER JOIN Shutter.std:groupwin(id).std:lastevent() as S ON R.r.shutter = S.id WHERE S is null OR S.status = 'closed'"
]
}
And I want to change the statements (rules) list during execution time, Is there a query or something that I could use?
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | FIWARE-TECH-HELP [ 10278 ] |
Assignee | Fabiana Fournier [ tali ] |
Assignee | Fabiana Fournier [ tali ] | Gilles Privat [ gprivat ] |
HD-Enabler | Cepheus [ 10883 ] | |
HD-Chapter | IoT [ 10839 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Answered [ 10104 ] |
Resolution | Done [ 10000 ] | |
Status | Answered [ 10104 ] | Closed [ 6 ] |
Fix Version/s | 2021 [ 12600 ] |