Commit 4b13647556c777f21242a2be4b666dcc4e76e608

Authored by yusufc
Committed by Andrew Shvayka
1 parent 0f0a25ce

- Alarm option is added to switch nodes in rule engine.

... ... @@ -31,7 +31,7 @@ public class TbOriginatorTypeFilterNodeConfiguration implements NodeConfiguratio
31 31 public TbOriginatorTypeFilterNodeConfiguration defaultConfiguration() {
32 32 TbOriginatorTypeFilterNodeConfiguration configuration = new TbOriginatorTypeFilterNodeConfiguration();
33 33 configuration.setOriginatorTypes(Arrays.asList(
34   - EntityType.DEVICE
  34 + EntityType.ALARM
35 35 ));
36 36 return configuration;
37 37 }
... ...
... ... @@ -27,7 +27,7 @@ import org.thingsboard.server.common.msg.TbMsg;
27 27 type = ComponentType.FILTER,
28 28 name = "originator type switch",
29 29 configClazz = EmptyNodeConfiguration.class,
30   - relationTypes = {"Device", "Asset", "Entity View", "Tenant", "Customer", "User", "Dashboard", "Rule chain", "Rule node"},
  30 + relationTypes = {"Device", "Asset", "Alarm", "Entity View", "Tenant", "Customer", "User", "Dashboard", "Rule chain", "Rule node"},
31 31 nodeDescription = "Route incoming messages by Message Originator Type",
32 32 nodeDetails = "Routes messages to chain according to the originator type ('Device', 'Asset', etc.).",
33 33 uiResources = {"static/rulenode/rulenode-core-config.js"},
... ... @@ -73,6 +73,9 @@ public class TbOriginatorTypeSwitchNode implements TbNode {
73 73 case RULE_NODE:
74 74 relationType = "Rule node";
75 75 break;
  76 + case ALARM:
  77 + relationType = "Alarm";
  78 + break;
76 79 default:
77 80 throw new TbNodeException("Unsupported originator type: " + originatorType);
78 81 }
... ...