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

[fiware-stackoverflow] Can a derived event be used as an initiator for a temporal context?

    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 23-02-2016 at 13:02
      Please, ANSWER this question AT https://stackoverflow.com/questions/35578078/can-a-derived-event-be-used-as-an-initiator-for-a-temporal-context

      Question:
      Can a derived event be used as an initiator for a temporal context?

      Description:
      I am trying to have a derived event trigger an AbsenceEPA, by having the associated temporal context be initiated by the said derived event. Is that possible? This is the configuration I have:

      {
      "epn":{
      "events":[
      {
      "name":"PollingCount",
      "createdDate":"Fri Feb 19 2016",
      "attributes":[

      { "name":"restaurantId", "type":"String", "dimension":"0" }

      ,

      { "name":"pollCount", "type":"Integer", "dimension":0 }

      ]
      },
      {
      "name":"PrinterContextUpdate",
      "createdDate":"Fri Feb 19 2016",
      "attributes":[

      { "name":"restaurantId", "type":"String", "dimension":0 }

      ,

      { "name":"lastTimestamp", "type":"String", "dimension":0 }

      ,

      { "name":"entityId", "type":"String", "dimension":"0" }

      ,

      { "name":"entityType", "type":"String", "dimension":0 }

      ]
      },
      {
      "name":"PrinterStoppedPolling",
      "createdDate":"Tue Feb 23 2016",
      "attributes":[

      { "name":"restaurantId", "type":"String", "dimension":"0" }

      ,

      { "name":"lastTimestamp", "type":"String", "dimension":0 }

      ]
      }
      ],
      "epas":[
      {
      "name":"CountEPA",
      "epaType":"Aggregate",
      "context":"CountCompositeContext",
      "inputEvents":[

      { "name":"PrinterContextUpdate", "alias":"pp", "consumptionPolicy":"Consume", "instanceSelectionPolicy":"First" }

      ],
      "computedVariables":[

      { "name":"Count", "aggregationType":"Count", "pp":"1" }

      ],
      "evaluationPolicy":"Deferred",
      "cardinalityPolicy":"Single",
      "internalSegmentation":[],
      "derivedEvents":[
      {
      "name":"PollingCount",
      "reportParticipants":false,
      "expressions":

      { "restaurantId":"ArrayGet(pp.restaurantId, ArraySize(pp.restaurantId) - 1)", "pollCount":"Count" }

      }
      ]
      },
      {
      "name":"PrinterStoppedPollingEPA",
      "createdDate":"Tue Feb 23 2016",
      "epaType":"Absence",
      "context":"SentLastPoll",
      "inputEvents":[

      { "name":"PollingCount", "alias":"pc", "consumptionPolicy":"Consume", "instanceSelectionPolicy":"First" }

      ,

      { "name":"PrinterContextUpdate", "alias":"pu", "consumptionPolicy":"Consume", "instanceSelectionPolicy":"First" }

      ],
      "computedVariables":[],
      "evaluationPolicy":"Deferred",
      "cardinalityPolicy":"Single",
      "internalSegmentation":[],
      "derivedEvents":[
      {
      "name":"PrinterStoppedPolling",
      "reportParticipants":false,
      "expressions":

      { "restaurantId":"pc.restaurantId", "lastTimestamp":"pu.lastTimestamp" }

      }
      ]
      }
      ],
      "contexts":{
      "temporal":[
      {
      "name":"CountTemporalContext",
      "type":"TemporalInterval",
      "atStartup":false,
      "neverEnding":false,
      "initiators":[

      { "initiatorType":"Event", "initiatorPolicy":"Ignore", "name":"PrinterContextUpdate" }

      ],
      "terminators":[

      { "terminatorType":"RelativeTime", "terminationType":"Terminate", "relativeTime":"90000" }

      ]
      },
      {
      "name":"SentLastPoll",
      "createdDate":"Tue Feb 23 2016",
      "type":"TemporalInterval",
      "atStartup":false,
      "neverEnding":false,
      "initiators":[

      { "initiatorType":"Event", "initiatorPolicy":"Add", "name":"PollingCount" }

      ],
      "terminators":[

      { "terminatorType":"Event", "terminatorPolicy":"First", "terminationType":"Terminate", "name":"PrinterContextUpdate" }

      ,

      { "terminatorType":"RelativeTime", "terminationType":"Terminate", "relativeTime":"60000" }

      ]
      }
      ],
      "segmentation":[
      {
      "name":"CountSegmentationContext",
      "participantEvents":[

      { "name":"PrinterContextUpdate", "expression":"PrinterContextUpdate.restaurantId" }

      ]
      }
      ],
      "composite":[
      {
      "name":"CountCompositeContext",
      "temporalContexts":[

      { "name":"CountTemporalContext" }

      ],
      "segmentationContexts":[

      { "name":"CountSegmentationContext" }

      ]
      }
      ]
      },
      "consumers":[
      {
      "name":"alert",
      "createdDate":"Fri Feb 19 2016",
      "type":"Rest",
      "properties":[

      { "name":"URL", "value":"http://api-dev.priorhq.com/polling_monitor" }

      ,

      { "name":"contentType", "value":"application/json" }

      ,

      { "name":"formatter", "value":"json" }

      ,

      { "name":"delimiter", "value":";" }

      ,

      { "name":"tagDataSeparator", "value":"=" }

      ,

      { "name":"dateFormat", "value":"yyyy-MM-dd HH:mm:ss" }

      ],
      "events":[

      { "name":"PollingCount" }

      ,

      { "name":"PrinterStoppedPolling" }

      ]
      }
      ],
      "producers":[],
      "name":"Prior"
      }
      }

      The derived event is PollingCount and the temporal context is PrinterStoppedPolling.

      Thank you.

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

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

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 15:09|CREATED monitor | # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

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

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 18:07|UPDATED status: transition Answer| # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 21:07|UPDATED status: transition Answered| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 21:07|UPDATED status: transition Answered| # answers= 1, accepted answer= False

          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: