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

[fiware-stackoverflow] How to correctly configure cepheus cep to recalculate a attribute every hour?

    Details

      Description

      Created question in FIWARE Q/A platform on 26-05-2016 at 18:05
      Please, ANSWER this question AT https://stackoverflow.com/questions/37466515/how-to-correctly-configure-cepheus-cep-to-recalculate-a-attribute-every-hour

      Question:
      How to correctly configure cepheus cep to recalculate a attribute every hour?

      Description:
      Let me explain it a bit more.
      I have this cep config:

      {
      "host":"http://localhost:1028", //Cepheus CEP
      "in":[
      {
      "id":"A.*",
      "type":"Pevent",
      "isPattern":true,
      "providers":[
      "http://localhost:1027" //Cepheus Broker
      ],
      "attributes":[

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

      ,

      { "name":"endDate", "type":"date" }

      ]
      }
      ],
      "out":[
      {
      "id":"A",
      "type":"Event",
      "brokers":[

      { "url":"http://localhost:1026" //orion }

      ],
      "attributes":[

      { "name":"expired", "type":"int" }

      ]
      }
      ],
      "statements":[
      "INSERT INTO Event SELECT idEvent as id, case when endDate<current_timestamp() then 1 else 0 end as expired FROM Pevent OUTPUT all"
      ]
      }

      This config when new entity is aded or modified in cepheus context broker, it notifies cepheus cep and cep calculates if the entity is expired or not and send the result to orion.This is working ok with no problem.

      The problem now is that I need to recalculate the expired attribute one time per hour (24h a day 365 day a year continuoly) and i don't know if it is possible in cep because I can't make it work and don't find any info.

      Thanks a lot in advance.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        2h 55m 1 Backlog Manager 22/May/17 6:08 PM
        In Progress In Progress Closed Closed
        3h 1 Backlog Manager 22/May/17 9:08 PM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        fla Fernando Lopez made changes -
        Assignee Backlog Manager [ backlogmanager ]
        fla Fernando Lopez made changes -
        HD-Enabler Cepheus [ 10883 ]
        HD-Chapter IoT [ 10839 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 21:09|UPDATED status: transition Finish| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 21:09|UPDATED status: transition Finish| # answers= 1, accepted answer= True
        backlogmanager Backlog Manager made changes -
        Resolution Done [ 10000 ]
        Status In Progress [ 3 ] Closed [ 6 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 18:09|UPDATED status: transition Answer| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 18:09|UPDATED status: transition Answer| # answers= 1, accepted answer= True
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 15:13|CREATED monitor | # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 15:13|CREATED monitor | # answers= 1, accepted answer= True
        backlogmanager Backlog Manager created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved: