added field notifyDevice for TbMsgAttributesNode in demo data
This commit is contained in:
parent
d605a94d5b
commit
b925149e7a
@ -43,7 +43,8 @@
|
|||||||
"name": "Save Client Attributes",
|
"name": "Save Client Attributes",
|
||||||
"debugMode": false,
|
"debugMode": false,
|
||||||
"configuration": {
|
"configuration": {
|
||||||
"scope": "CLIENT_SCOPE"
|
"scope": "CLIENT_SCOPE",
|
||||||
|
"notifyDevice": "true"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -31,7 +31,8 @@
|
|||||||
"name": "Save Client Attributes",
|
"name": "Save Client Attributes",
|
||||||
"debugMode": false,
|
"debugMode": false,
|
||||||
"configuration": {
|
"configuration": {
|
||||||
"scope": "CLIENT_SCOPE"
|
"scope": "CLIENT_SCOPE",
|
||||||
|
"notifyDevice": "true"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -51,6 +51,9 @@ public class TbMsgAttributesNode implements TbNode {
|
|||||||
@Override
|
@Override
|
||||||
public void init(TbContext ctx, TbNodeConfiguration configuration) throws TbNodeException {
|
public void init(TbContext ctx, TbNodeConfiguration configuration) throws TbNodeException {
|
||||||
this.config = TbNodeUtils.convert(configuration, TbMsgAttributesNodeConfiguration.class);
|
this.config = TbNodeUtils.convert(configuration, TbMsgAttributesNodeConfiguration.class);
|
||||||
|
if (config.getNotifyDevice() == null) {
|
||||||
|
config.setNotifyDevice(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -68,7 +71,8 @@ public class TbMsgAttributesNode implements TbNode {
|
|||||||
config.getScope(),
|
config.getScope(),
|
||||||
new ArrayList<>(attributes),
|
new ArrayList<>(attributes),
|
||||||
new TelemetryNodeCallback(ctx, msg),
|
new TelemetryNodeCallback(ctx, msg),
|
||||||
config.getNotifyDevice() || StringUtils.isEmpty(notifyDeviceStr) || Boolean.parseBoolean(notifyDeviceStr));
|
config.getNotifyDevice() || StringUtils.isEmpty(notifyDeviceStr) || Boolean.parseBoolean(notifyDeviceStr)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user