[ https://jira.fiware.org/browse/HELP-8854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
José Ignacio Carretero Guarde reassigned HELP-8854:
---------------------------------------------------
Assignee: Backlog Manager
> [fiware-stackoverflow] Can a derived event be used as an initiator for a temporal context?
> ------------------------------------------------------------------------------------------
>
> Key: HELP-8854
> URL: https://jira.fiware.org/browse/HELP-8854
> Project: Help-Desk
> Issue Type: Monitor
> Components: FIWARE-TECH-HELP
> Reporter: Backlog Manager
> Assignee: Backlog Manager
> Labels: cep, fiware
>
> Created question in FIWARE Q/A platform on 23-02-2016 at 13:02
> {color: red}Please, ANSWER this question AT{color} 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.
--
This message was sent by Atlassian JIRA
(v6.4.1#64016)
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy