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

        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
        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
        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

          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: