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