diff --git a/doc/api.md b/doc/api.md index 5153d9935..0adc09104 100644 --- a/doc/api.md +++ b/doc/api.md @@ -417,7 +417,13 @@ Case 2: "explicitAttrs": true ``` -just measures defined in active, static (plus conditionally TimeInstant) will be propagated to NGSI interface. +In this case, should only progress active and static attributes defined in the device or group provision (`TimeInstant` attribute +will be also included if enabled). In other words, having `"explicitAttrs":true` would prevent the IoTA creating attributes into the related +entity within the context broker from measures that are not explicitly defined in the device or group provision. + +Note that attributes defined in the provision that are not receiving a measure (or having a expression defined that is resulting `null`) +will not progress (this means, the NGSI request to update the entity in the context broker is not going to include that attribute) +unless `skipValue` is defined to other value than `null` Case 3: diff --git a/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin25.json b/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin25.json index 50591d76d..0892e5049 100644 --- a/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin25.json +++ b/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin25.json @@ -11,6 +11,10 @@ "expectedAtt": { "type": "number", "value": 13 + }, + "alsoexpectedAtt": { + "value": null, + "type": "number" } }, { diff --git a/test/unit/ngsiv2/plugins/multientity-plugin_test.js b/test/unit/ngsiv2/plugins/multientity-plugin_test.js index cea20c32c..a89e33d7c 100644 --- a/test/unit/ngsiv2/plugins/multientity-plugin_test.js +++ b/test/unit/ngsiv2/plugins/multientity-plugin_test.js @@ -522,7 +522,13 @@ const iotAgentConfig = { expression: 'z+1' }, { - name: 'nonexpectedAtt', + name: 'alsoexpectedAtt', + type: 'number', + expression: 'w+1', + skipValue: 'loquesea' + }, + { + name: 'nonexpectedAttByDefaultSkipValue', type: 'number', expression: 'w+1' }, @@ -600,7 +606,7 @@ const iotAgentConfig = { describe('NGSI-v2 - Multi-entity plugin', function () { beforeEach(function (done) { - logger.setLevel('DEBUG'); + logger.setLevel('FATAL'); iotAgentLib.activate(iotAgentConfig, function () { iotAgentLib.clearAll(function () {