Rules

This wizard allows us to create rules.

Steps

Administration

Essential data for registration and identification for creating a rule in the platform.

Rules consist of Easy rules and Advanced rules, which are created differently in the second step.

We can configure a rule with the following options:

New rules: Create a new rule from scratch. From catalog: Create a rule from the catalog. Clone existing rule: Create a rule from a previously created one.

Easy rule

Build a rule using basic concepts for evaluation. You must select the rule type depending on whether you want a data stream collection, the operation result, or an event. When selecting Data Stream collection, the Data Stream button above will be enabled.

Administration Administration

Clicking the Data Stream button will open a menu where you can search for and add the data stream, along with adding an alias.

Menu Menu

However, if you select Operation result or Event as the rule type, the Data Stream button will not be visible.

For all three rule types, you need to select a parameter, which consists of an identifier, type, and value.

Parameters Parameters

Within the parameter menu, you will enter an identifier, type (string, integer, number, or boolean), and value.

Parameters Parameters

Rule Definition (Easy)

Build a rule using basic concepts for evaluation.

Rule Conditions

This will trigger the rule when the rule meets the filter conditions.

Select a data stream to compose the filter.

Condition Condition

You can also add a group to add another condition to the filter.

Add Add

Resource Resource

Perform the following actions

Actions will be executed when the configured conditions are met.

There are different options within the New Action menu:

Actions Actions

You can delay the action by a specified number of milliseconds, creating a wait threshold before executing the actions. In this case, creating a new alarm has been selected.

RuleCondition RuleCondition

Advanced rule

Build a rule using basic concepts for evaluation.

AdvancedRule AdvancedRule

Just like easy rules, the same options exist. You need to select the rule type depending on whether you want a data stream collection, the operation result, or an event. When selecting Data Stream collection, the Data Stream button above will be enabled.

MenuDatastream MenuDatastream

Rule Definition (Advanced)

Allows you to write the JavaScript code of the rule for evaluation. It also allows you to delay the execution of actions with a wait threshold.

DefinitionRule DefinitionRule

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.

items items