- Alarm option is added to switch nodes in rule engine.
This commit is contained in:
parent
0f0a25ce38
commit
4b13647556
@ -31,7 +31,7 @@ public class TbOriginatorTypeFilterNodeConfiguration implements NodeConfiguratio
|
|||||||
public TbOriginatorTypeFilterNodeConfiguration defaultConfiguration() {
|
public TbOriginatorTypeFilterNodeConfiguration defaultConfiguration() {
|
||||||
TbOriginatorTypeFilterNodeConfiguration configuration = new TbOriginatorTypeFilterNodeConfiguration();
|
TbOriginatorTypeFilterNodeConfiguration configuration = new TbOriginatorTypeFilterNodeConfiguration();
|
||||||
configuration.setOriginatorTypes(Arrays.asList(
|
configuration.setOriginatorTypes(Arrays.asList(
|
||||||
EntityType.DEVICE
|
EntityType.ALARM
|
||||||
));
|
));
|
||||||
return configuration;
|
return configuration;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import org.thingsboard.server.common.msg.TbMsg;
|
|||||||
type = ComponentType.FILTER,
|
type = ComponentType.FILTER,
|
||||||
name = "originator type switch",
|
name = "originator type switch",
|
||||||
configClazz = EmptyNodeConfiguration.class,
|
configClazz = EmptyNodeConfiguration.class,
|
||||||
relationTypes = {"Device", "Asset", "Entity View", "Tenant", "Customer", "User", "Dashboard", "Rule chain", "Rule node"},
|
relationTypes = {"Device", "Asset", "Alarm", "Entity View", "Tenant", "Customer", "User", "Dashboard", "Rule chain", "Rule node"},
|
||||||
nodeDescription = "Route incoming messages by Message Originator Type",
|
nodeDescription = "Route incoming messages by Message Originator Type",
|
||||||
nodeDetails = "Routes messages to chain according to the originator type ('Device', 'Asset', etc.).",
|
nodeDetails = "Routes messages to chain according to the originator type ('Device', 'Asset', etc.).",
|
||||||
uiResources = {"static/rulenode/rulenode-core-config.js"},
|
uiResources = {"static/rulenode/rulenode-core-config.js"},
|
||||||
@ -73,6 +73,9 @@ public class TbOriginatorTypeSwitchNode implements TbNode {
|
|||||||
case RULE_NODE:
|
case RULE_NODE:
|
||||||
relationType = "Rule node";
|
relationType = "Rule node";
|
||||||
break;
|
break;
|
||||||
|
case ALARM:
|
||||||
|
relationType = "Alarm";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new TbNodeException("Unsupported originator type: " + originatorType);
|
throw new TbNodeException("Unsupported originator type: " + originatorType);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user