Browse Source

updated rule node details & descriptions

pull/8661/head
ShvaykaD 3 years ago
parent
commit
1ebd385c8c
  1. 8
      rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/CalculateDeltaNode.java
  2. 4
      rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbFetchDeviceCredentialsNode.java
  3. 11
      rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetAttributesNode.java
  4. 8
      rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetCustomerAttributeNode.java
  5. 10
      rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetCustomerDetailsNode.java
  6. 11
      rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetDeviceAttrNode.java
  7. 5
      rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetOriginatorFieldsNode.java
  8. 12
      rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetRelatedAttributeNode.java
  9. 13
      rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetTelemetryNode.java
  10. 4
      rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetTenantAttributeNode.java
  11. 6
      rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetTenantDetailsNode.java

8
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/CalculateDeltaNode.java

@ -47,11 +47,9 @@ import static org.thingsboard.common.util.DonAsynchron.withCallback;
@RuleNode(type = ComponentType.ENRICHMENT, @RuleNode(type = ComponentType.ENRICHMENT,
name = "calculate delta", relationTypes = {"Success", "Failure", "Other"}, name = "calculate delta", relationTypes = {"Success", "Failure", "Other"},
configClazz = CalculateDeltaNodeConfiguration.class, configClazz = CalculateDeltaNodeConfiguration.class,
nodeDescription = "Calculates and adds 'delta' value into message based on the incoming and previous value", nodeDescription = "Calculates delta and amount of time passed between previous timeseries key reading " +
nodeDetails = "Calculates delta and period based on the previous timeseries reading and current data. " + "and current value for this key from the incoming message",
"Delta calculation is done in scope of the message originator, e.g. device, asset or customer.<br><br>" + nodeDetails = "Useful for metering use cases, when you need to calculate consumption based on pulse counter reading.",
"If there is input key, the output relation will be <code>Success</code> unless delta is negative and corresponding configuration parameter is set. <br>" +
"If there is no input value key in the incoming message, the output relation will be <code>Other</code>.",
uiResources = {"static/rulenode/rulenode-core-config.js"}, uiResources = {"static/rulenode/rulenode-core-config.js"},
configDirective = "tbEnrichmentNodeCalculateDeltaConfig") configDirective = "tbEnrichmentNodeCalculateDeltaConfig")
public class CalculateDeltaNode implements TbNode { public class CalculateDeltaNode implements TbNode {

4
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbFetchDeviceCredentialsNode.java

@ -39,8 +39,8 @@ import java.util.concurrent.ExecutionException;
configClazz = TbFetchDeviceCredentialsNodeConfiguration.class, configClazz = TbFetchDeviceCredentialsNodeConfiguration.class,
nodeDescription = "Adds device credentials to the message or message metadata", nodeDescription = "Adds device credentials to the message or message metadata",
nodeDetails = "if message originator type is Device and device credentials was successfully fetched, " + nodeDetails = "if message originator type is Device and device credentials was successfully fetched, " +
"rule node enriches message or message metadata with <i>credentialsType</i> and <i>credentials</i> properties " + "rule node enriches message or message metadata with <i>credentialsType</i> and <i>credentials</i> properties. " +
"and send message via <code>Success</code> chain. Otherwise message will be forwarded via <code>Failure</code> chain.", "Useful when you need to fetch device credentials and use them for further message processing. For example, use device credentials to interact with external systems.",
uiResources = {"static/rulenode/rulenode-core-config.js"}, uiResources = {"static/rulenode/rulenode-core-config.js"},
configDirective = "tbEnrichmentNodeFetchDeviceCredentialsConfig") configDirective = "tbEnrichmentNodeFetchDeviceCredentialsConfig")
public class TbFetchDeviceCredentialsNode extends TbAbstractNodeWithFetchTo<TbFetchDeviceCredentialsNodeConfiguration> { public class TbFetchDeviceCredentialsNode extends TbAbstractNodeWithFetchTo<TbFetchDeviceCredentialsNodeConfiguration> {

11
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetAttributesNode.java

@ -36,13 +36,10 @@ import org.thingsboard.server.common.msg.TbMsg;
@RuleNode(type = ComponentType.ENRICHMENT, @RuleNode(type = ComponentType.ENRICHMENT,
name = "originator attributes", name = "originator attributes",
configClazz = TbGetAttributesNodeConfiguration.class, configClazz = TbGetAttributesNodeConfiguration.class,
nodeDescription = "Adds originator attributes and/or latest timeseries data for the message originator to the message or message metadata", nodeDescription = "Adds attributes and/or latest timeseries data for the message originator to the message or message metadata",
nodeDetails = "If attributes enrichment configured, <i>CLIENT/SHARED/SERVER</i> attributes are added into message or message metadata " + nodeDetails = "Useful when you need to retrieve some attributes or the latest telemetry readings from the message originator " +
"with specific prefix: <i>cs/shared/ss</i>. Latest telemetry value adds without prefix. <br><br>" + "that are not included in the incoming message to use them for further message processing. " +
"See the following examples of accessing those attributes in other nodes:<br>" + "For example to filter messages based on the threshold value stored in the attributes.",
"<code>metadata.cs_serialNumber</code> - to access client side attribute 'serialNumber' that was fetched to message metadata.<br>" +
"<code>metadata.shared_limit</code> - to access shared side attribute 'limit' that was fetched to message metadata.<br>" +
"<code>msg.temperature</code> - to access latest telemetry 'temperature' that was fetched to message.<br>",
uiResources = {"static/rulenode/rulenode-core-config.js"}, uiResources = {"static/rulenode/rulenode-core-config.js"},
configDirective = "tbEnrichmentNodeOriginatorAttributesConfig") configDirective = "tbEnrichmentNodeOriginatorAttributesConfig")
public class TbGetAttributesNode extends TbAbstractGetAttributesNode<TbGetAttributesNodeConfiguration, EntityId> { public class TbGetAttributesNode extends TbAbstractGetAttributesNode<TbGetAttributesNodeConfiguration, EntityId> {

8
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetCustomerAttributeNode.java

@ -36,11 +36,9 @@ import org.thingsboard.server.common.data.util.TbPair;
name = "customer attributes", name = "customer attributes",
configClazz = TbGetEntityDataNodeConfiguration.class, configClazz = TbGetEntityDataNodeConfiguration.class,
nodeDescription = "Adds message originator customer attributes or latest telemetry into message or message metadata", nodeDescription = "Adds message originator customer attributes or latest telemetry into message or message metadata",
nodeDetails = "Enriches incoming message or message metadata with the customer's attributes or latest telemetry values. <br><br>" + nodeDetails = "Useful in multi-customer solutions where each customer has a different configuration or threshold set " +
"The customer is selected based on the originator of the message. " + "that is stored as customer attributes or telemetry data and used for dynamic message filtering, transformation, " +
"Supported originator types: <br><br>" + "or actions such as alarm creation if the threshold is exceeded.",
"Customer, User, Asset, Device. <br><br>" +
"Useful when you store some parameters on the customer level and would like to use them for message processing.",
uiResources = {"static/rulenode/rulenode-core-config.js"}, uiResources = {"static/rulenode/rulenode-core-config.js"},
configDirective = "tbEnrichmentNodeCustomerAttributesConfig") configDirective = "tbEnrichmentNodeCustomerAttributesConfig")
public class TbGetCustomerAttributeNode extends TbAbstractGetEntityDataNode<CustomerId> { public class TbGetCustomerAttributeNode extends TbAbstractGetEntityDataNode<CustomerId> {

10
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetCustomerDetailsNode.java

@ -44,13 +44,9 @@ import java.util.NoSuchElementException;
@RuleNode(type = ComponentType.ENRICHMENT, @RuleNode(type = ComponentType.ENRICHMENT,
name = "customer details", name = "customer details",
configClazz = TbGetCustomerDetailsNodeConfiguration.class, configClazz = TbGetCustomerDetailsNodeConfiguration.class,
nodeDescription = "Adds originator customer details into message or message metadata", nodeDescription = "Adds message originator customer details into message or message metadata",
nodeDetails = "Enriches incoming message or message metadata with the corresponding customer details. " + nodeDetails = "Useful in multi-customer solutions where we need dynamically use customer contact information " +
"Selected details adds to the message with predefined prefix: <code>customer_</code>. Examples: <code>customer_title</code>, <code>customer_address</code>, etc. <br><br>" + "such as email, phone, address, etc., for notifications via email, SMS, and other notification providers.",
"The customer is selected based on the originator of the message. Supported originator types: <br><br>" +
"Device, Asset, Entity view, User, Edge. <br><br>" +
"If message originator is not assigned to customer, or originator is not supported - " +
"message will be forwarded via <code>Failure</code> chain, otherwise, <code>Success</code> chain will be used.",
uiResources = {"static/rulenode/rulenode-core-config.js"}, uiResources = {"static/rulenode/rulenode-core-config.js"},
configDirective = "tbEnrichmentNodeEntityDetailsConfig") configDirective = "tbEnrichmentNodeEntityDetailsConfig")
public class TbGetCustomerDetailsNode extends TbAbstractGetEntityDetailsNode<TbGetCustomerDetailsNodeConfiguration, CustomerId> { public class TbGetCustomerDetailsNode extends TbAbstractGetEntityDetailsNode<TbGetCustomerDetailsNodeConfiguration, CustomerId> {

11
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetDeviceAttrNode.java

@ -34,15 +34,10 @@ import org.thingsboard.server.common.msg.TbMsg;
@RuleNode(type = ComponentType.ENRICHMENT, @RuleNode(type = ComponentType.ENRICHMENT,
name = "related device attributes", name = "related device attributes",
configClazz = TbGetDeviceAttrNodeConfiguration.class, configClazz = TbGetDeviceAttrNodeConfiguration.class,
nodeDescription = "Add originators related device attributes and latest telemetry values into message or message metadata", nodeDescription = "Add originators related device attributes and/or latest telemetry values into message or message metadata",
nodeDetails = "Related device lookup based on the configured relation query. " + nodeDetails = "Related device lookup based on the configured relation query. " +
"If multiple related devices are found, only first device is used for message enrichment, other entities are discarded.<br><br>" + "If multiple related devices are found, only first device is used for message enrichment, other entities are discarded. " +
"If Attributes enrichment configured, <i>CLIENT/SHARED/SERVER</i> attributes are added into message or message metadata " + "Useful when you need to retrieve attributes and/or latest telemetry values from device that has a relation to the message originator and use them for further message processing.",
"with specific prefix: <i>cs/shared/ss</i>. Latest telemetry value adds into message or message metadata without prefix. <br><br>" +
"See the following examples of accessing those attributes in other nodes:<br>" +
"<code>metadata.cs_serialNumber</code> - to access client side attribute 'serialNumber' that was fetched to message metadata.<br>" +
"<code>metadata.shared_limit</code> - to access shared side attribute 'limit' that was fetched to message metadata.<br>" +
"<code>msg.temperature</code> - to access latest telemetry 'temperature' that was fetched to message.<br>",
uiResources = {"static/rulenode/rulenode-core-config.js"}, uiResources = {"static/rulenode/rulenode-core-config.js"},
configDirective = "tbEnrichmentNodeDeviceAttributesConfig") configDirective = "tbEnrichmentNodeDeviceAttributesConfig")
public class TbGetDeviceAttrNode extends TbAbstractGetAttributesNode<TbGetDeviceAttrNodeConfiguration, DeviceId> { public class TbGetDeviceAttrNode extends TbAbstractGetAttributesNode<TbGetDeviceAttrNodeConfiguration, DeviceId> {

5
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetOriginatorFieldsNode.java

@ -39,10 +39,7 @@ import java.util.concurrent.ExecutionException;
configClazz = TbGetOriginatorFieldsConfiguration.class, configClazz = TbGetOriginatorFieldsConfiguration.class,
nodeDescription = "Adds message originator fields values into message or message metadata", nodeDescription = "Adds message originator fields values into message or message metadata",
nodeDetails = "Fetches fields values specified in the mapping. If specified field is not part of originator fields it will be ignored. " + nodeDetails = "Fetches fields values specified in the mapping. If specified field is not part of originator fields it will be ignored. " +
"Supported originator types: <br><br>" + "Useful when you need to retrieve originator fields and use them for further message processing.",
"Tenant, Customer, User, Asset, Device, Alarm, Rule chain, Entity view.<br><br>" +
"If message originator is not supported - message will be forwarded via <code>Failure</code> chain, " +
"otherwise, <code>Success</code> chain will be used.",
uiResources = {"static/rulenode/rulenode-core-config.js"}, uiResources = {"static/rulenode/rulenode-core-config.js"},
configDirective = "tbEnrichmentNodeOriginatorFieldsConfig") configDirective = "tbEnrichmentNodeOriginatorFieldsConfig")
public class TbGetOriginatorFieldsNode extends TbAbstractGetMappedDataNode<EntityId, TbGetOriginatorFieldsConfiguration> { public class TbGetOriginatorFieldsNode extends TbAbstractGetMappedDataNode<EntityId, TbGetOriginatorFieldsConfiguration> {

12
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetRelatedAttributeNode.java

@ -36,16 +36,10 @@ import java.util.Arrays;
type = ComponentType.ENRICHMENT, type = ComponentType.ENRICHMENT,
name = "related entity data", name = "related entity data",
configClazz = TbGetRelatedDataNodeConfiguration.class, configClazz = TbGetRelatedDataNodeConfiguration.class,
nodeDescription = "Adds originators related entity data into message or message metadata", nodeDescription = "Adds originators related entity attributes or latest telemetry or fields into message or message metadata",
nodeDetails = "Related entity lookup based on the configured relation query. " + nodeDetails = "Related entity lookup based on the configured relation query. " +
"If multiple related entities are found, only first entity is used for message enrichment, other entities are discarded.<br><br>" + "If multiple related entities are found, only first entity is used for message enrichment, other entities are discarded. " +
"Data to fetch configuration: <br><br>" + "Useful when you need to retrieve data from an entity that has a relation to the message originator and use them for further message processing.",
"<i>Attributes</i> - rule node fetches server scope attributes configured in mapping and adds them into message or message metadata. " +
"Access example in other nodes: <code>metadata.serialNumber</code>, <code>msg.serialNumber</code>.<br>" +
"<i>Latest telemetry</i> - rule node fetches latest telemetry configured in mapping and adds them into message or message metadata. " +
"Access example in other nodes: <code>metadata.temperature</code>, <code>msg.temperature</code>.<br>" +
"<i>Fields</i> - rule node fetches fields configured in mapping and adds them into message or message metadata. " +
"Access example in other nodes: <code>metadata.entityName</code>, <code>msg.entityName</code>.",
uiResources = {"static/rulenode/rulenode-core-config.js"}, uiResources = {"static/rulenode/rulenode-core-config.js"},
configDirective = "tbEnrichmentNodeRelatedAttributesConfig") configDirective = "tbEnrichmentNodeRelatedAttributesConfig")
public class TbGetRelatedAttributeNode extends TbAbstractGetEntityDataNode<EntityId> { public class TbGetRelatedAttributeNode extends TbAbstractGetEntityDataNode<EntityId> {

13
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetTelemetryNode.java

@ -55,16 +55,9 @@ import static org.thingsboard.rule.engine.metadata.TbGetTelemetryNodeConfigurati
name = "originator telemetry", name = "originator telemetry",
configClazz = TbGetTelemetryNodeConfiguration.class, configClazz = TbGetTelemetryNodeConfiguration.class,
nodeDescription = "Adds message originator telemetry for selected time range into message metadata", nodeDescription = "Adds message originator telemetry for selected time range into message metadata",
nodeDetails = "The node allows you to configure fetch interval and fetch strategy. Fetch strategy section allows you to select fetch mode: <i>First/Last/All</i> <br><br>" + nodeDetails = "Useful when you need to get telemetry data set from the message originator for a specific time range " +
"If selected fetch mode <i>First</i> rule node will retrieve the closest telemetry to the fetch interval's start.<br>" + "instead of fetching just the latest telemetry or if you need to get the closest telemetry to the fetch interval start or end. " +
"If selected fetch mode <i>Last</i> rule node will retrieve the closest telemetry to the fetch interval's end.<br>" + "Also, this node can be used for telemetry aggregation within configured fetch interval.",
"If selected fetch mode <i>All</i> rule node will retrieve telemetry from the fetch interval with configurable query parameters.<br><br>" +
"Query parameters: <br><br>" +
"Data aggregation function: <i>Min/Max/Average/Sum/Count/None</i>. " +
"If selected aggregation function <i>None</i> rule node allows you to configure additional query parameters: <br><br>" +
"Order by timestamp: <i>Ascending/Descending</i><br><br>" +
"Limit: Min value - 2, max value - 1000.<br><br>" +
"Other data aggregation functions useful when you need to get the aggregated telemetry data as a single value for the configured fetch interval.",
uiResources = {"static/rulenode/rulenode-core-config.js"}, uiResources = {"static/rulenode/rulenode-core-config.js"},
configDirective = "tbEnrichmentNodeGetTelemetryFromDatabase") configDirective = "tbEnrichmentNodeGetTelemetryFromDatabase")
public class TbGetTelemetryNode implements TbNode { public class TbGetTelemetryNode implements TbNode {

4
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetTenantAttributeNode.java

@ -35,8 +35,8 @@ import org.thingsboard.server.common.data.util.TbPair;
name = "tenant attributes", name = "tenant attributes",
configClazz = TbGetEntityDataNodeConfiguration.class, configClazz = TbGetEntityDataNodeConfiguration.class,
nodeDescription = "Adds message originator tenant attributes or latest telemetry into message or message metadata", nodeDescription = "Adds message originator tenant attributes or latest telemetry into message or message metadata",
nodeDetails = "Enriches incoming message or message metadata with the tenant's attributes or latest telemetry values. " + nodeDetails = "Useful when you need to retrieve some common configuration or threshold set " +
"Useful when you store some parameters on the tenant level and would like to use them for message processing.", "that is stored as tenant attributes or telemetry data and use it for further message processing.",
uiResources = {"static/rulenode/rulenode-core-config.js"}, uiResources = {"static/rulenode/rulenode-core-config.js"},
configDirective = "tbEnrichmentNodeTenantAttributesConfig") configDirective = "tbEnrichmentNodeTenantAttributesConfig")
public class TbGetTenantAttributeNode extends TbAbstractGetEntityDataNode<TenantId> { public class TbGetTenantAttributeNode extends TbAbstractGetEntityDataNode<TenantId> {

6
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetTenantDetailsNode.java

@ -33,9 +33,9 @@ import org.thingsboard.server.common.msg.TbMsg;
@RuleNode(type = ComponentType.ENRICHMENT, @RuleNode(type = ComponentType.ENRICHMENT,
name = "tenant details", name = "tenant details",
configClazz = TbGetTenantDetailsNodeConfiguration.class, configClazz = TbGetTenantDetailsNodeConfiguration.class,
nodeDescription = "Adds originator tenant details into message or message metadata", nodeDescription = "Adds message originator tenant details into message or message metadata",
nodeDetails = "Enriches incoming message or message metadata with the corresponding tenant details. " + nodeDetails = "Useful when we need to retrieve contact information from your tenant " +
"Selected details adds to the message with predefined prefix: <code>tenant_</code>, Examples: <code>tenant_title</code> or <code>tenant_address</code>, etc.", "such as email, phone, address, etc., for notifications via email, SMS, and other notification providers.",
uiResources = {"static/rulenode/rulenode-core-config.js"}, uiResources = {"static/rulenode/rulenode-core-config.js"},
configDirective = "tbEnrichmentNodeEntityDetailsConfig") configDirective = "tbEnrichmentNodeEntityDetailsConfig")
public class TbGetTenantDetailsNode extends TbAbstractGetEntityDetailsNode<TbGetTenantDetailsNodeConfiguration, TenantId> { public class TbGetTenantDetailsNode extends TbAbstractGetEntityDetailsNode<TbGetTenantDetailsNodeConfiguration, TenantId> {

Loading…
Cancel
Save