- 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() {
|
||||
TbOriginatorTypeFilterNodeConfiguration configuration = new TbOriginatorTypeFilterNodeConfiguration();
|
||||
configuration.setOriginatorTypes(Arrays.asList(
|
||||
EntityType.DEVICE
|
||||
EntityType.ALARM
|
||||
));
|
||||
return configuration;
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ import org.thingsboard.server.common.msg.TbMsg;
|
||||
type = ComponentType.FILTER,
|
||||
name = "originator type switch",
|
||||
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",
|
||||
nodeDetails = "Routes messages to chain according to the originator type ('Device', 'Asset', etc.).",
|
||||
uiResources = {"static/rulenode/rulenode-core-config.js"},
|
||||
@ -73,6 +73,9 @@ public class TbOriginatorTypeSwitchNode implements TbNode {
|
||||
case RULE_NODE:
|
||||
relationType = "Rule node";
|
||||
break;
|
||||
case ALARM:
|
||||
relationType = "Alarm";
|
||||
break;
|
||||
default:
|
||||
throw new TbNodeException("Unsupported originator type: " + originatorType);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user