Rule Engine

Modern industrial society is divided into many vertical fields, and different types of buildings represent different fields, such as commercial centers, interstellar hotels, hospitals, office buildings, factories, parking lots, and apartment buildings. These buildings basically contain HVAC, lighting, water supply and drainage, air supply and exhaust, elevators, fire protection and other mechanical and electrical equipment systems. The main users of these electromechanical equipment systems are generally the property or engineering team in the building. They have similar management requirements for these subsystems, which can be roughly classified into the following major contents: real-time equipment monitoring, alarm notification, viewing records and reports, schedule management, user management, etc.
The rule engine allows users to set corresponding rules for devices connected to the platform. After the conditions specified by the rule are met, the platform will trigger appropriate actions to satisfy the user needs.

../_images/rule_engine.png

Application

Realize complex and changeable business rules through “drag & drop” stages to build pipelines and avoid constant code changes.

Features

The rule engine greatly alleviates the disasters caused by frequent demand changes to the business system, helps users separate business rules from the program code, arranges business rules by combining predefined function operators, and executes corresponding operations according to business rules . The front-end is based on the workflow framework, and the back-end is based on the streamset for secondary development, providing a complete set of operators, supporting drag-and-drop operators, associating measurement points, forming a pipeline, and implementing business logic.

  • Provide rich stages for building domain

  • Support configuring pipelines with different stages

  • Support batch devices control according to business rules

  • Consider internal and 3rd app. as two input sources to set schedules to trigger events

  • Trigger alarms when logic meets condition

Use Path

Edit Rules

Log in to the EnOS Management Console, select EnOS Edge> Rule Engine> New Rule; fill in the rule name. Or select the rule to be edited in the list, click to enter the rule engine interface, drag the operator to edit the rule. After editing, click Publish to publish the rule.

../_images/rules_engine_edit_rules.png

Associate Edge

After creating a new rule and publishing it, you need to associate it with a specific Edge (enter the Edge details page and add a rule).

../_images/rules_engine_associated_rules.png

Debug Function

The system supports online debugging function, you can view the value of input, output, and intermediate variables. Since the configuration center and the Edge device run separately, the rule engine configuration center cannot obtain the Edge data in real time. Therefore, when the user is debugging, enter “Debug” and temporarily open the debugging channel (MQTT) between the configuration center and the Edge device. In the debugging state, the rule can call the real data source of the device, but the generated control result will not take effect on the device. Exit the Debug state, the debug channel is closed.

../_images/rules_engine_debugging_features.png