Details
-
Type:
Monitor
-
Status: Closed
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Chapter:Data
-
HD-Enabler:Orion
Description
Created question in FIWARE Q/A platform on 03-08-2017 at 19:08
Please, ANSWER this question AT 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+
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | FIWARE-TECH-HELP [ 10278 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Resolution | Done [ 10000 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Assignee | Fermín Galán [ fermin ] |
Summary | [fiware-stackoverflow] How to create advanced subscriptions expression at Orion Context Broker NGSIv2? | FIWARE.Question.Tech.How to create advanced subscriptions expression at Orion Context Broker NGSIv2?. |
HD-Enabler | Orion [ 10875 ] | |
HD-Chapter | Data [ 10838 ] |
Fix Version/s | 2021 [ 12600 ] |
Transition | Time In Source Status | Execution Times | Last Executer | Last Execution Date | |||||
---|---|---|---|---|---|---|---|---|---|
|
2m 48s | 1 | Backlog Manager | 12/Jan/18 7:54 PM | |||||
|
8m 58s | 1 | Backlog Manager | 12/Jan/18 8:03 PM |
2018-01-12 19:51|CREATED monitor | # answers= 1, accepted answer= True