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

        backlogmanager Backlog Manager created issue -
        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
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        fla Fernando Lopez made changes -
        Assignee Fabiana Fournier [ tali ]
        fla Fernando Lopez made changes -
        Assignee Fabiana Fournier [ tali ] Gilles Privat [ gprivat ]
        fla Fernando Lopez made changes -
        HD-Enabler Cepheus [ 10883 ]
        HD-Chapter IoT [ 10839 ]
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        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
        backlogmanager Backlog Manager made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        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
        veronika Veronika Vlnkova made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        33d 1h 17m 1 Backlog Manager 14/Feb/18 9:05 PM
        In Progress In Progress Answered Answered
        3h 1 Backlog Manager 15/Feb/18 12:05 AM
        Answered Answered Closed Closed
        168d 16h 19m 1 Veronika Vlnkova 02/Aug/18 5:25 PM

          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: