Observed Property¶
Observed property based filtering is done on the basis of properties mentioned in record: output property. Property can be of text or count. Input data will be passed only if the value of the observed properties satisfies the condition in MR rule.
Below is the create rule JSON for observed property based filtering:
{
"RuleName": "Demo rule observed property",
"RuleDescription": "Demo rule for user guide",
"parallelismFactor": "1",
"input": {
"DirectExchange": "Direct.Exchange",
"RoutingKey": "e325f4fe-a0e3-4252-82af-4c24deb8c0cf"
},
"params": [
{
"name": "feature",
"value": "room1"
},
{
"name": "sensorID",
"value": "NEXUS1"
},
{
"name": "time",
"value": {
"starttime": "",
"endtime": ""
}
},
{
"name": "expression",
"value": {
"if": "",
"then": "",
"else": ""
}
},
{
"name": "",
"type": "rectangle/circles/polygon",
"geoFencing": "NO",
"value": {
"points": [
{
"x": "",
"y": ""
},
{
"x": "",
"y": ""
}
]
}
},
{
"name": "ObservedProperties",
"value": [
{
"name": "systolic",
"type": "quantity",
"value": "80",
"operator": ""
}
]
}
],
"output": {
"TopicExchange": "DemoExchange",
"Topic": "demo12"
}
}
As we can see in the above JSON sensor ID, feature and observed properties are provided. These act as filtering condition for input data and routes input data with sensor NEXUS1, feature as room1 and systolic property in record:output with the given systolic value. In case input data misses the observed property or the value of given observed property is not matching the condition, it will be discarded. Topic exchange name is DemoExchange which we have already created in the topic exchange section.
In the above create rule JSON filtering type of observed property can be used in the following ways:
Range Check(Band Pass)¶
In order to specify the value as a range check format, the value can be provided with lower range value and upper range value. Here we have used systolic property of range of 80-120 which means any value from 80 to 120 will be passed from this MR rule. This acts as band pass. Following portion of create rule JSON can be used for band pass:
{
"name": "ObservedProperties",
"value": [
{
"name": "systolic",
"type": "quantity",
"value": "(80,120)",
"operator": ""
}
]
}
Now we will create the above rule in the following 2 ways:
Using MR API swagger
Using MR portal
Using MR API swagger¶
Click on POST /routingRules API in swagger, use the above JSON template and hit
Try it out!
button, it will create a new MR rule with observed property value as shown in the image below:

As we can see in the above image MR rule created with rule ID - 1143 which will be used to start this rule. You can refer to Start the Routing Channel section to start rule.
Using MR portal¶
Click on
Create Rule
button in MR rule, fill in all the details as mentioned in the image below and clickCreate Rule
button, it will create a new MR rule with position as shown in the image below:

After clicking
Create Rule
button below message will be dispalyed at the upper right corner with rule ID. Here in our case rule ID is 1144.

As you can see in the above image MR rule created with rule ID - 1144 will be used to start this rule. You can refer to Start the Routing Channel section to start the rule.
Send Request operation for observed property within range of MR rule:
After the rule is created it needs to be started as mentioned above and then input JSON can be posted to MR rule using send request API. Please refer Execute and View Result section to send the request and view the output in SSE viewer.
Below is the input SOS observation JSON
{
"version": "1.0.1",
"observations": [
{
"sensor": "NEXUS1",
"feature": "room1",
"record": [
{
"starttime": "1-JUN-2015 15:30:00 IST",
"output": [
{
"name": "systolic",
"value": "95",
"type": "quantity"
}
]
}
],
"meta-data": []
}
]
}
Here in input JSON we can see that sensor name is NEXUS1, feature is room1 and systolic property has the value which is within the range of 80-120 of MR rule. We can now use send request API to verify this rule.
After the data is sent to MR rule we can see that output of MR rule is received in SSE viewer. The output remains the same as input.

Range Check (Band Block)¶
In order to specify the value as a range check format, the value can be provided with lower range value and upper range value. Here we have used systolic property with range of 80-120 which means any value from 80 to 120 will be not be passed from this MR rule. This acts as band block. Following portion of create rule JSON can be used for band pass:
{
"name": "ObservedProperties",
"value": [
{
"name": "systolic",
"type": "quantity",
"value": "!(80,120)",
"operator": ""
}
]
}
Now we will create the above in the following 2 ways:
Using MR API swagger
Using MR portal
Using MR API swagger¶
Click on POST /routingRules API in swagger, use the above JSON template and hit
Try it out!
button, it will create a new MR rule with observed property value as shown in the image below:

As you can see in the above image MR rule created with rule ID - 1145 will be used to start this rule. You can refer to Start the Routing Channel section to start the rule.
Using MR portal¶
Click on
Create Rule
button in MR rule, fill in all the details as mentioned in the image below and clickCreate Rule
button, it will create a new MR rule with position as shown in the image below:

After clicking
Create Rule
button the below message will be displayed at the upper right corner with rule ID. Here in our case rule ID is 1146.

As we can see in the above image MR rule created with rule ID - 1146 will be used to start this rule. You can refer to Start the Routing Channel section to start rule.
Send Request operation for observed property of MR rule:
After the rule is created it needs to be started as mentioned above and then input JSON can be posted to MR rule using send request API. Please refer to Execute and View Result section to send the request and view the output in SSE viewer.
Below is the input SOS observation JSON
{
"version": "1.0.1",
"observations": [
{
"sensor": "NEXUS1",
"feature": "room1",
"record": [
{
"starttime": "1-JUN-2015 15:30:00 IST",
"output": [
{
"name": "systolic",
"value": "125",
"type": "quantity"
}
]
}
],
"meta-data": []
}
]
}
Here in input JSON we can see that sensor name is NEXUS1, feature is room1 and systolic property having the value not in range of 80-120 of MR rule as MR rule will block the value within the specified range. We can now use send request API to verify this rule.
After the data is sent to MR rule we can see that output of MR rule is received in SSE viewer as shown in the image below. The output remains the same as input:

“<” Operator¶
In this filtering only the upper value should be defined and the operator “<” is used. Here we have used systolic property with < operator and value 200 which means any value greater than or equal to 200 for input JSON will be not be passed from this MR rule. Following portion of create rule JSON can be used for < operator:
{
"name": "ObservedProperties",
"value": [
{
"name": "systolic",
"type": "quantity",
"value": "200",
"operator": "<"
}
]
}
Now we will create above rule in the following 2 ways:
Using MR API swagger
Using MR portal
Using MR API swagger¶
Click on POST /routingRules API in swagger, use the above JSON template and hit
Try it out!
button, it will create a new MR rule with observed property value as shown in the image below:

As we can see in the above image MR rule created with rule ID - 1147 will be used to start this rule. We can refer to start rule API to start rule.
Using MR portal¶
Click on
Create Rule
button in MR rule, fill in all the details as mentioned in the image below and clickCreate Rule
button, it will create a new MR rule with position as shown in the image below:

After clicking
Create Rule
button below message will be displayed at the upper right corner with rule ID. Here in our case rule ID is 1148.

As we can see in the above image MR rule created with rule ID - 1148 will be used to start this rule. We can refer to start rule section through MR portal to start rule.
Send Request operation for observed property of MR rule:
After the rule is created it needs to be started as mentioned above and then input JSON can be posted to MR rule using send request API. Please refer to Execute and View Result section to send the request and view the output in SSE viewer.
Below is the input SOS observation JSON
{
"version": "1.0.1",
"observations": [
{
"sensor": "NEXUS1",
"feature": "room1",
"record": [
{
"starttime": "1-JUN-2015 15:30:00 IST",
"output": [
{
"name": "systolic",
"value": "185",
"type": "quantity"
}
]
}
],
"meta-data": []
}
]
}
Here in input JSON we can see that sensor name is NEXUS1, feature is room1 and systolic property having the value less than 200 as in MR rule . If we send a value equal to or greater than 200 it will be blocked. We can now use send request API to verify this rule.
After the data is sent to MR rule we can see that output of MR rule is received in SSE viewer as shown in the image below. The output remains the same as input:
“>” Operator¶
In this filtering only the lower value should be defined and the operator “>” is used. Here we have used systolic property with > operator and value 50 which means any value less than or equal to 50 for input JSON will be not be passed from this MR rule. Following portion of create rule JSON can be used for > operator:
{
"name": "ObservedProperties",
"value": [
{
"name": "systolic",
"type": "quantity",
"value": "50",
"operator": ">"
}
]
}
Now we will create the above in the following 2 ways:
Using MR API swagger
Using MR portal
Using MR API swagger¶
Click on POST /routingRules API in swagger, use the above JSON template and hit
Try it out!
button, it will create a new MR rule with observed property value as shown in the image below:

As you can see in the above image MR rule created with rule ID - 1149 which will be used to start this rule. You can refer to Start the Routing Channel section to start the rule.
Using MR portal¶
Click on
Create Rule
button in MR rule, fill in all the details as mentioned in the image below and clickCreate Rule
button, it will create a new MR rule with position as shown in the image below:

After clicking
Create Rule
button, the below message will be displayed at the upper right corner with rule ID. Here in our case rule ID is 1150.

As you can see in the above image MR rule created with rule ID - 1150 will be used to start this rule. You can refer to Start the Routing Channel section to start rule.
Send Request operation for observed property of MR rule:
After the rule is created it needs to be started and then input JSON can be posted to MR rule using send request API. Please refer Execute and View Result section to send the request and view the output in SSE viewer.
Below is the input SOS observation JSON
{
"version": "1.0.1",
"observations": [
{
"sensor": "NEXUS1",
"feature": "room1",
"record": [
{
"starttime": "1-JUN-2015 15:30:00 IST",
"output": [
{
"name": "systolic",
"value": "55",
"type": "quantity"
}
]
}
],
"meta-data": []
}
]
}
Here in input JSON we can see that sensor name is NEXUS1, feature is room1 and systolic property’s value is greater than 50 as in MR rule . If we send a value equal to or less than 50 it will be blocked. We can now use send request API to verify this rule.
After the data is sent to MR rule we can see that output of MR rule is received in SSE viewer as shown in the image below. The output remains the same as input:

“<=” Operator¶
In this filtering only the higher value should be defined and the operator “<=” is used. Here we have used systolic property with <= operator and value 200 which means any value greater than 200 for input JSON will not be passed from this MR rule. Following portion of create rule JSON can be used for <= operator:
{
"name": "ObservedProperties",
"value": [
{
"name": "systolic",
"type": "quantity",
"value": "200",
"operator": "<="
}
]
}
Now we will create the above rule in the following 2 ways:
Using MR API swagger
Using MR portal
Using MR API swagger¶
Click on POST /routingRules API in swagger, use the above JSON template and hit
Try it out!
button, it will create a new MR rule with observed property value as shown in the image below:

As you can see in the above image MR rule created with rule ID - 1151 will be used to start this rule. You can refer to Start the Routing Channel section to start rule.
Using MR portal¶
Click on
Create Rule
button in MR rule, fill in all the details as mentioned in the image below and clickCreate Rule
button, it will create a new MR rule with position as shown in the image below:

After clicking
Create Rule
button below message will be displayed at the upper right corner with rule ID. Here in our case rule ID is 1152.

As you can see in the above image MR rule created with rule ID - 1152 will be used to start this rule. You can refer to Start the Routing Channel section to start the rule.
Send Request operation for observed property of MR rule:
After the rule is created it needs to be started and then input JSON can be posted to MR rule using send request API. Please refer to Execute and View Result section to send the request and view the output in SSE viewer.
Below is the input SOS observation JSON
{
"version": "1.0.1",
"observations": [
{
"sensor": "NEXUS1",
"feature": "room1",
"record": [
{
"starttime": "1-JUN-2015 15:30:00 IST",
"output": [
{
"name": "systolic",
"value": "185",
"type": "quantity"
}
]
}
],
"meta-data": []
}
]
}
Here in input JSON we can see that sensor name is NEXUS1, feature is room1 and systolic property having the value less than or equal to 200 as in MR rule. If we send a value greater than 200 it will be blocked. We can now use send request API to verify this rule.
After the data is sent to MR rule we can see that output of MR rule is received in SSE viewer as shown in the image below. The output remains the same as input:

“>=” Operator¶
In this filtering only the lower value should be defined and the operator “>=” is used. Here we have used systolic property with >= operator and value 50 which means any value less than 50 for input JSON will be not be passed from this MR rule. Following portion of create rule JSON can be used for >= operator:
{
"name": "ObservedProperties",
"value": [
{
"name": "systolic",
"type": "quantity",
"value": "50",
"operator": ">="
}
]
}
Now we will create the above rule in the following 2 ways:
Using MR API swagger
Using MR portal
Using MR API swagger¶
Click on POST /routingRules API in swagger, use the above JSON template and hit
Try it out!
button, it will create a new MR rule with observed property value as shown in the image below:

As you can see in the above image MR rule created with rule ID - 1153 will be used to start this rule. You can refer to Start the Routing Channel section to start the rule.
Using MR portal¶
Click on
Create Rule
button in MR rule, fill in all the details as mentioned in the image below and clickCreate Rule
button, it will create a new MR rule with position as shown in the image below:

After clicking
Create Rule
button below message will be displayed at the upper right corner with rule ID. Here in our case rule ID is 1154.

As you can see in the above image MR rule created with rule ID - 1154 which will be used to start this rule. You can refer to Start the Routing Channel section to start the rule.
Send Request operation for observed property of MR rule:
After the rule is created it needs to be started as mentioned above and then input JSON can be posted to MR rule using send request API. Please refer to Execute and View Result section to send the request and view the output in SSE viewer.
Below is the input SOS observation JSON
{
"version": "1.0.1",
"observations": [
{
"sensor": "NEXUS1",
"feature": "room1",
"record": [
{
"starttime": "1-JUN-2015 15:30:00 IST",
"output": [
{
"name": "systolic",
"value": "55",
"type": "quantity"
}
]
}
],
"meta-data": []
}
]
}
Here in input JSON we can see that sensor name is NEXUS1, feature is room1 and systolic property having the value greater than or equal to 50 as in MR rule. If we send a value less than 50 it will be blocked. We can now use send request API to verify this rule.
After the data is sent to MR rule we can see that output of MR rule is received in SSE viewer as shown in the image below. The output remains the same as input:

“!=” Operator¶
In this filtering only one value to be blocked is defined and the operator “!=” is used. Here we have used systolic property with != operator and value 80 which means any value equal to 80 for input JSON will not be passed from this MR rule. Following portion of create rule JSON can be used for != operator:
{
"name": "ObservedProperties",
"value": [
{
"name": "systolic",
"type": "quantity",
"value": "80",
"operator": "!="
}
]
}
Now we will create the above rule in the following 2 ways:
Using MR API swagger
Using MR portal
Using MR API swagger¶
Click on POST /routingRules API in swagger, use the above JSON template and hit
Try it out!
button, it will create a new MR rule with observed property value as shown in the image below:

As you can see in the above image MR rule created with rule ID - 1155 will be used to start this rule. You can refer to Start the Routing Channel section to start the rule.
Using MR portal¶
Click on
Create Rule
button in MR rule, fill in all the details as mentioned in the image below and clickCreate Rule
button, it will create a new MR rule with position as shown in the image below:

After clicking
Create Rule
button below message will be displayed at the upper right corner with rule ID. Here in our case rule ID is 1156.

As you can see in the above image MR rule created with rule ID - 1156 will be used to start this rule. You can refer to Start the Routing Channel section to start the rule.
Send Request operation for observed property of MR rule:
After the rule is created it needs to be started and then input JSON can be posted to MR rule using send request API. Please refer to Execute and View Result section to send the request and view the output in SSE viewer.
Below is the input SOS observation JSON
{
"version": "1.0.1",
"observations": [
{
"sensor": "NEXUS1",
"feature": "room1",
"record": [
{
"starttime": "1-JUN-2015 15:30:00 IST",
"output": [
{
"name": "systolic",
"value": "81",
"type": "quantity"
}
]
}
],
"meta-data": []
}
]
}
Here in input JSON we can see that sensor name is NEXUS1, feature is room1 and systolic property having the value not equal to 80 as in MR rule . If we send a value equal to 80 it will be blocked. We can now use send request API to verify this rule.
After the data is sent to MR rule we can see that output of MR rule is received in SSE viewer as shown in the image below. The output remains the same as input:

REGEX Checking¶
In this filtering, regular expression is defined in rule like sys*. Here we have used systolic property of type text defined with value as regular expression as sys* which means any value other than sys* regular exp for input JSON will not pass from this MR rule. Following portion of create rule JSON can be used for regex operator:
{
"name": "ObservedProperties",
"value": [
{
"name": "systolic",
"type": "text",
"value": "sys*",
"operator": ""
}
]
}
Now we will create the above rule in the following 2 ways:
Using MR API swagger
Using MR portal
Using MR API swagger¶
Click on POST /routingRules API in swagger, use the above JSON template and hit
Try it out!
button, it will create a new MR rule with observed property value as shown in the image below:

As you can see in the above image MR rule created with rule ID - 1157 will be used to start this rule. You can refer to Start the Routing Channel section to start the rule.
Using MR portal¶
Click on
Create Rule
button in MR rule , fill in all the details as mentioned in below image and clickCreate Rule
button , it will create a new MR rule with position as shown in the image below:

After clicking
Create Rule
button, the below message will be displayed at the upper right corner with rule ID. Here in our case rule ID is 1158.

As you can see in the above image MR rule created with rule ID - 1158 will be used to start this rule. You can refer to Start the Routing Channel section to start the rule.
Send Request operation for observed property of MR rule:
After the rule is created it needs to be started as mentioned above and then input JSON can be posted to MR rule using send request API. Please refer to Execute and View Result section to send the request and view the output in SSE viewer.
Below is the input SOS observation JSON
{
"version": "1.0.1",
"observations": [
{
"sensor": "NEXUS1",
"feature": "room1",
"record": [
{
"starttime": "1-JUN-2015 15:30:00 IST",
"output": [
{
"name": "systolic",
"value": "systolic1",
"type": "text"
}
]
}
],
"meta-data": []
}
]
}
Here in input JSON we can see that sensor name is NEXUS1, feature is room1 and systolic property having the value systolic1 which satisfies the regular expression condition of MR rule. If we send a value other than the regular expression, it will be blocked. We can now use send request API to verify this rule.
After the data is sent to MR rule we can see that output of MR rule is received in SSE viewer as shown in the image below. The output remains the same as input:
