Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-13271

[fiware-stackoverflow] Insert a rule in Cepheus-CEP while running

    Details

    • Type: Monitor
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:

      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":"temperature", "type":"double" }

      ,

      { "name":"shutter", "type":"string" }

      ]
      }
      ],
      "out":[
      {
      "id":"ShutterX",
      "type":"Shutter",
      "attributes":[

      { "name":"status", "type":"string" }

      ]
      }
      ],
      "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

        Hide
        backlogmanager Backlog Manager added a comment -

        2018-01-12 19:48|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-01-12 19:48|CREATED monitor | # answers= 0, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-02-14 21:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-02-14 21:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-02-15 00:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-02-15 00:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False

          People

          • Assignee:
            gprivat Gilles Privat
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: