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

FIWARE.Question.Tech.Data.CEP.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 http://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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        21h 1 Backlog Manager 24/Feb/16 12:02 PM
        In Progress In Progress Answered Answered
        2h 59m 1 Backlog Manager 24/Feb/16 3:02 PM
        Answered Answered Closed Closed
        1d 20h 59m 1 Backlog Manager 26/Feb/16 12:02 PM

          People

          • Assignee:
            urishani Uri Shani
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: