tbMsg.getCallback().onFailure(newRuleNodeException("Message is processed by more then "+maxRuleNodeExecutionsPerMessage+" rule nodes!",ruleChainName,ruleNode));
tbMsg.getCallback().onFailure(newRuleNodeException("Message is processed by more then "+maxRuleNodeExecutionsPerMessage+" rule nodes!",ruleChainName,ruleNode));
}
}
}
}
}
@ -160,4 +179,23 @@ public class RuleNodeActorMessageProcessor extends ComponentMsgProcessor<RuleNod
protectedRuleNodeExceptiongetInactiveException(){
protectedRuleNodeExceptiongetInactiveException(){
returnnewRuleNodeException("Rule Node is not active! Failed to initialize.",ruleChainName,ruleNode);
returnnewRuleNodeException("Rule Node is not active! Failed to initialize.",ruleChainName,ruleNode);
@ -36,15 +36,17 @@ public class ComponentDescriptor extends SearchTextBased<ComponentDescriptorId>
@Getter@SetterprivateComponentTypetype;
@Getter@SetterprivateComponentTypetype;
@ApiModelProperty(position=4,value="Scope of the Rule Node. Always set to 'TENANT', since no rule chains on the 'SYSTEM' level yet.",accessMode=ApiModelProperty.AccessMode.READ_ONLY,allowableValues="TENANT",example="TENANT")
@ApiModelProperty(position=4,value="Scope of the Rule Node. Always set to 'TENANT', since no rule chains on the 'SYSTEM' level yet.",accessMode=ApiModelProperty.AccessMode.READ_ONLY,allowableValues="TENANT",example="TENANT")
@Getter@SetterprivateComponentScopescope;
@Getter@SetterprivateComponentScopescope;
@ApiModelProperty(position=5,value="Clustering mode of the RuleNode. This mode represents the ability to start Rule Node in multiple microservices.",accessMode=ApiModelProperty.AccessMode.READ_ONLY,allowableValues="USER_PREFERENCE, ENABLED, SINGLETON",example="ENABLED")
@ApiModelProperty(position=5,value="Name of the Rule Node. Taken from the @RuleNode annotation.",accessMode=ApiModelProperty.AccessMode.READ_ONLY,example="Custom Rule Node")
@ApiModelProperty(position=6,value="Name of the Rule Node. Taken from the @RuleNode annotation.",accessMode=ApiModelProperty.AccessMode.READ_ONLY,example="Custom Rule Node")
@Getter@SetterprivateStringname;
@Getter@SetterprivateStringname;
@ApiModelProperty(position=6,value="Full name of the Java class that implements the Rule Engine Node interface.",accessMode=ApiModelProperty.AccessMode.READ_ONLY,example="com.mycompany.CustomRuleNode")
@ApiModelProperty(position=7,value="Full name of the Java class that implements the Rule Engine Node interface.",accessMode=ApiModelProperty.AccessMode.READ_ONLY,example="com.mycompany.CustomRuleNode")
@Getter@SetterprivateStringclazz;
@Getter@SetterprivateStringclazz;
@ApiModelProperty(position=7,value="Complex JSON object that represents the Rule Node configuration.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@ApiModelProperty(position=8,value="Complex JSON object that represents the Rule Node configuration.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@ApiModelProperty(position=7,value="JSON with the rule node configuration. Structure depends on the rule node implementation.",dataType="com.fasterxml.jackson.databind.JsonNode")
@ApiModelProperty(position=8,value="JSON with the rule node configuration. Structure depends on the rule node implementation.",dataType="com.fasterxml.jackson.databind.JsonNode")
privatetransientJsonNodeconfiguration;
privatetransientJsonNodeconfiguration;
@JsonIgnore
@JsonIgnore
privatebyte[]configurationBytes;
privatebyte[]configurationBytes;
@ -69,6 +71,7 @@ public class RuleNode extends SearchTextBasedWithAdditionalInfo<RuleNodeId> impl
@Description("Remove the rule chain with device profile by mark in the checkbox and then click on the trash can icon in the menu that appears at the top")
@Description("Remove the rule chain with device profile by mark in the checkbox and then click on the trash can icon in the menu that appears at the top")
publicvoidremoveSelectedProfileRuleChain(){
publicvoidremoveSelectedProfileRuleChain(){
@ -148,11 +123,10 @@ public class DeleteRuleChainTest extends AbstractDriverBaseTest {
"Entity Unassigned","Attributes Updated","Attributes Deleted","Alarm Acknowledged","Alarm Cleared","Other","Entity Assigned From Tenant","Entity Assigned To Tenant",
"Entity Unassigned","Attributes Updated","Attributes Deleted","Alarm Acknowledged","Alarm Cleared","Alarm Assigned","Alarm Unassigned","Comment Created","Comment Updated","Other","Entity Assigned From Tenant","Entity Assigned To Tenant",
"Relation Added or Updated","Relation Deleted","All Relations Deleted","Timeseries Updated","Timeseries Deleted"},
"Relation Added or Updated","Relation Deleted","All Relations Deleted","Timeseries Updated","Timeseries Deleted"},
nodeDescription="Route incoming messages by Message Type",
nodeDescription="Route incoming messages by Message Type",
nodeDetails="Sends messages with message types <b>\"Post attributes\", \"Post telemetry\", \"RPC Request\"</b> etc. via corresponding chain, otherwise <b>Other</b> chain is used.",
nodeDetails="Sends messages with message types <b>\"Post attributes\", \"Post telemetry\", \"RPC Request\"</b> etc. via corresponding chain, otherwise <b>Other</b> chain is used.",
@ -85,6 +85,14 @@ public class TbMsgTypeSwitchNode implements TbNode {