[ https://jira.fiware.org/browse/HELP-13344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fernando Lopez reassigned HELP-13344: ------------------------------------- Assignee: Fermín Galán > [fiware-stackoverflow] How to create advanced subscriptions expression at Orion Context Broker NGSIv2? > ------------------------------------------------------------------------------------------------------ > > Key: HELP-13344 > URL: https://jira.fiware.org/browse/HELP-13344 > Project: Help-Desk > Issue Type: Monitor > Components: FIWARE-TECH-HELP > Reporter: Backlog Manager > Assignee: Fermín Galán > Labels: fiware, fiware-orion > > Created question in FIWARE Q/A platform on 03-08-2017 at 19:08 > {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/45490529/how-to-create-advanced-subscriptions-expression-at-orion-context-broker-ngsiv2 > +Question:+ > How to create advanced subscriptions expression at Orion Context Broker NGSIv2? > +Description:+ > According to official documentation of Orion Context Broker NGSIv2 : > You can include filtering expressions in conditions. For example, to > get notified not only if pressure changes, but if it changes within > the range 700-800. This is an advanced topic, see the "Subscriptions" > section in the NGSIv2 specification. > At NGSIv2 subscriptions there is no notifyConditions such as NGSIv1 , it was replaced by subject.condition object: > condition: Condition to trigger notifications. This field is optional > and it may contain two properties, both optional: > > > attrs: array of attribute names > expression: an expression composed of q, mq, georel, > geometry and coords (see "List entities" operation above about this > field) > > When we use subject.condition.attrs, it contains an array of attributes names, these names define the "triggering attributes", i.e. attributes that upon creation/change due to entity creation or update trigger the notification. > But, for subject.condition.expression there is not example at official documentations. > Getting pieces of puzzle is possible to deduce : > Is possible do combine subject.condition.expression and subject.condition.attrs. If I set and attribute different of expression,eg. attr foo with expression 'boo>10' what it will do ? Will this behave like an OR or AND ? > Is possible to set multiple expressions. Will this behave like an OR or AND ? > It would be nice to have some examples of these more complex subscriptions combining the different ways of delimiting the entities in the subscription. > NOTE: This question is related to Orion Version 1.7.0+ -- 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