Commit b925149e7ae2cbf7a9c90ecd64e8db35f32b1792

Authored by YevhenBondarenko
Committed by Andrew Shvayka
1 parent d605a94d

added field notifyDevice for TbMsgAttributesNode in demo data

... ... @@ -43,7 +43,8 @@
43 43 "name": "Save Client Attributes",
44 44 "debugMode": false,
45 45 "configuration": {
46   - "scope": "CLIENT_SCOPE"
  46 + "scope": "CLIENT_SCOPE",
  47 + "notifyDevice": "true"
47 48 }
48 49 },
49 50 {
... ...
... ... @@ -31,7 +31,8 @@
31 31 "name": "Save Client Attributes",
32 32 "debugMode": false,
33 33 "configuration": {
34   - "scope": "CLIENT_SCOPE"
  34 + "scope": "CLIENT_SCOPE",
  35 + "notifyDevice": "true"
35 36 }
36 37 },
37 38 {
... ...
... ... @@ -51,6 +51,9 @@ public class TbMsgAttributesNode implements TbNode {
51 51 @Override
52 52 public void init(TbContext ctx, TbNodeConfiguration configuration) throws TbNodeException {
53 53 this.config = TbNodeUtils.convert(configuration, TbMsgAttributesNodeConfiguration.class);
  54 + if (config.getNotifyDevice() == null) {
  55 + config.setNotifyDevice(true);
  56 + }
54 57 }
55 58
56 59 @Override
... ... @@ -68,7 +71,8 @@ public class TbMsgAttributesNode implements TbNode {
68 71 config.getScope(),
69 72 new ArrayList<>(attributes),
70 73 new TelemetryNodeCallback(ctx, msg),
71   - config.getNotifyDevice() || StringUtils.isEmpty(notifyDeviceStr) || Boolean.parseBoolean(notifyDeviceStr));
  74 + config.getNotifyDevice() || StringUtils.isEmpty(notifyDeviceStr) || Boolean.parseBoolean(notifyDeviceStr)
  75 + );
72 76 }
73 77
74 78 @Override
... ...