LogoLogo
Contact Uscybus.io
Connectware 1.8.0
Connectware 1.8.0
  • Getting Started
    • Introduction
    • Installing Connectware
      • System Requirements
      • Acquiring your License Key
      • Installing Connectware on Docker
      • Installing Connectware on Kubernetes
    • Connectware Admin UI
    • Basic Components of Connectware
    • Connecting your First Machine
      • Your First Service Commissioning File
  • Documentation
    • Services
      • Service Commissioning Files
        • Structure of Service Commissioning Files
          • description
          • metadata
          • parameters
          • definitions
          • resources
            • Cybus::Connection
            • Cybus::Endpoint
            • Cybus:Mapping
            • Cybus::Container
              • Docker problem with network changes
            • Cybus::Link
            • Cybus::IngressRoute
            • Cybus::User
            • Cybus::Role
            • Cybus::Volume
            • Cybus::File
            • Cybus::Server
            • Cybus::Node
        • Sample Service Commissioning Files
          • Modbus
            • “Bearbeitungszentrum BAZ” - Single File
            • “Bearbeitungszentrum BAZ” - Multiple Files
            • “Bearbeitungszentrum BAZ” - Single File and Custom Topics
            • “Bearbeitungszentrum BAZ” - Agent Mode
          • Machine Condition Monitoring : OPC UA + InfluxDB + Grafana Dashboard
            • “Machine Condition Monitoring Example” - Single File
          • Machine Utilization Example (Multi file service composition) : Modbus TCP + InfluxDB + Grafana + MSS
            • “Machine Utilization Example” - Machine Connectivity
            • “Machine Utilization Example” - Dashboards with role based access permission
            • “Machine Utilization Example” - Push data to MSSQL Database
      • Services View
      • Setting Up and Configuring Services
        • Installing Services
        • Enabling Services
        • Updating Services
        • Disabling Services
        • Deleting Services
      • Service Details View
      • ServiceID
      • Inter-Service Referencing
      • Deviation
      • Service Logs
        • Logs of Individual Services
        • Logs of All Services
      • Rule Engine
        • Data Processing Rules
        • Rule Sandbox
      • API Definition
    • Resources
      • Servers
      • Containers
      • Volumes
      • Connections
      • Endpoints
      • Mappings
      • Nodes
      • API Definition
    • User Management
      • Users and Roles View
      • Users
      • Roles
      • Permissions
      • Password Policy Rules
      • Default Admin User
      • MQTT Users
      • Adding a MQTT Publish Prefix for Users
      • Multi-Factor Authentication
      • Long lived JSON Web Tokens
      • Access Permissions for Admin-UI
        • UI Access
        • Minimum Access Role Pages
      • API Definition
    • Client Registry
      • Implicit Flow
      • Explicit Flow
      • Granting Access
      • API Definition
    • Certificates
    • Monitoring
      • Data Explorer
      • Live Data
    • Workbench
      • Flows in Git Repositories
    • System Status
      • Info
      • Metrics
      • Status
      • Retrieving More System Information
      • System Health
      • API Definition
    • Backup and Restore
      • Volumes
      • User Database
    • Configuration
      • Environment Variables
      • LDAP Configuration
      • MFA Configuration
    • Agents
      • Agents View
      • Installing Agents
        • Installing Agents via Docker
        • Installing Agents via Docker Compose
        • Installing Agents via Kubernetes
        • Using Mutual TLS for Agents
      • Registering Agents in Connectware
      • Using Agents
      • Monitoring Agents
      • Troubleshooting Agents
    • Industry Protocol Details
      • ADS
        • AdsConnection
        • AdsEndpoint
      • BACnet
        • BacnetConnection
        • BacnetEndpoint
      • EtherNet/IP
        • EthernetIpConnection
        • EthernetIpEndpoint
      • Focas
        • FocasConnection
        • FocasEndpoint
      • Generic VRPC
        • GenericVrpcConnection
        • GenericVrpcEndpoint
      • Hottinger Baldwin Messtechnik (HBM)
        • HbmdaqConnection
        • HbmdaqEndpoint
      • Heidenhain DNC
        • HeidenhainConnection
        • HeidenhainEndpoint
      • HTTP/REST
        • HttpConnection
        • HttpEndpoint
      • HTTP Server
        • HttpServer
        • HttpNode
      • InfluxDB
        • InfluxdbConnection
        • InfluxdbEndpoint
      • Kafka
        • KafkaConnection
        • KafkaEndpoint
      • Modbus/TCP
        • ModbusConnection
        • ModbusEndpoint
      • MQTT
        • MqttConnection
        • MqttEndpoint
      • MSSQL
        • MssqlConnection
        • MssqlEndpoint
      • OPC DA
        • OpcdaConnection
        • OpcdaEndpoint
      • OPC UA
        • OPC UA Client
          • OpcuaConnection
          • OpcuaEndpoint
        • OPC UA Server
          • OpcuaServer
          • OpcuaNode
        • OPC UA Object Types
        • OPC UA Server References
          • OpcuaReferenceNode
          • OpcuaObjectNode
      • Siemens SIMATIC S7
        • S7Connection
        • S7Endpoint
      • Shdr
        • ShdrConnection
        • ShdrEndpoint
      • Sinumerik
        • SinumerikConnection
        • SinumerikEndpoint
      • Sopas
        • SopasConnection
        • SopasEndpoint
      • SQL
        • SqlConnection
        • SqlEndpoint
      • Werma WIN Ethernet
        • WermaConnection
        • WermaEndpoint
      • Systemstate
        • SystemstateConnection
        • SystemstateEndpoint
      • API Definition
    • Connectware Licensing
    • Changelog
      • General changes from 0.x to 1.0
        • Upgrading from 0.x to 1.0
    • Upgrade Guide
      • Upgrading from 1.x to 1.7.0
      • Upgrading from 1.x to 1.5.0
Powered by GitBook
LogoLogo

Cybus

  • Terms and Condition
  • Imprint
  • Data Privacy

© Copyright 2025, Cybus GmbH

On this page
  • How Does the Rule Engine Work?
  • Types of Data Processing Rules
  • Use Cases for the Rule Engine
  • Testing Data Processing Rules

Was this helpful?

  1. Documentation
  2. Services

Rule Engine

PreviousLogs of All ServicesNextData Processing Rules

Last updated 6 months ago

Was this helpful?

The Rule Engine is a core component of Connectware's data processing capabilities, offering a sophisticated and flexible approach to handling and transforming data streams. With the Rule Engine, you can apply transformation rules to data for complex data manipulations. You can define these rules within the resources section of your service commissioning files. For testing data processing rules before deploying them to your live system, you can use the Rule Sandbox.

How Does the Rule Engine Work?

The Rule Engine uses JSONata for data transformation. Additionally, Connectware provides custom rules for specialized data processing and manipulation tasks, extending the core JSONata functionality.

For example, you could collect data from different machines on a specific topic, such as energy consumption and preprocess this data. The Rule Engine allows you to aggregate, filter, or transform this data before passing it on to other services or applications.

  • Rules are applied directly within Connectware's data processing pipeline, enabling powerful data transformations.

  • They are defined as a list (array) and executed sequentially, from top to bottom.

  • Individual rules may have specific input format requirements and can conditionally pass or block data messages to the next rule, such as with a change-of-value (COV) filter.

  • Each rule is configured as a named object with properties tailored to its specific type.

Types of Data Processing Rules

The following types of data processing rules are available.

For a detailled description of all rule engine parameters, see

  1. Aggregate Messages with the Burst Rule

Consolidate multiple messages into a payload array using the burst rule. You can set this up based on time intervals or a maximum size, which simplifies your data handling and improves transmission efficiency.

  1. Aggregate Data with the Collect Rule

Use the collect rule to combine data from multiple endpoints. This rule acts as a Last Value Cache, creating a single object containing the most recent data from each subscribed endpoint or topic. Each data point in the output is identified by a key, which can be either the endpoint itself or a custom label you've defined.

  1. Apply Change-of-Value (COV) Filtering

Utilize the change-of-value (cov) filter to transmit data only when it has changed compared to the previous message. You can specify a key to monitor for changes and set optional deadband parameters. This helps optimize your data transfer and reduce network bandwidth usage.

  1. Filter Data

Employ filter rules to evaluate incoming data against a JSONata expression. You can choose to forward or block data based on the evaluation result. This allows you to focus on relevant information and reduce data noise.

  1. Convert Data Formats with the Parse Rule

Employ the parse rule to transform non-JSON input data into a JSON object. You can specify the format of your input data, and the rule will convert it accordingly. This allows you to standardize your data format, making it compatible with other rule operations in your processing pipeline. After parsing, you can easily pass the resulting JSON object to subsequent rules for further processing or analysis.

  1. Use Context Variables

Store values as context variables for later use within the Rule Engine pipeline. You can use the setContextVars rule to pass data between rule steps or store intermediate results for further processing. This allows you to create complex data processing workflows.

  1. Store Intermediate States with the Stash Rule

Save intermediate states of messages for later reference using the stash rule. You can then use these stashed values in filter or transform rules, giving you additional data management capabilities and enabling more advanced processing techniques.

  1. Transform Data

Use JSONata expressions in the Rule Engine to transform your data in real-time. This query and transformation language allows you to convert, restructure, and perform calculations on your data, making it easier to integrate and process information from various sources.

Use Cases for the Rule Engine

Whether you're working with Industrial IoT sensor data, business analytics, or any other data-intensive application, the Rule Engine provides flexible solutions for common data processing tasks.

Here are some example use cases for the Rule Engine:

  • Data cleansing: Remove invalid or inconsistent data.

  • Data enrichment: Add missing information or context.

  • Data normalization: Standardize data formats.

  • Data filtering: Select specific data based on criteria.

  • Data transformation: Convert data from one format to another.

Consider the potential impact of rule changes on your data processing pipeline. Test your rules thoroughly to ensure they produce the desired results.

Testing Data Processing Rules

The Rule Sandbox offers a safe and interactive environment for testing and refining your data processing rules. It allows you to experiment with real-time data transformations, visualize the effects of your rules instantly, and debug any issues before deploying to your live system.

For more information, see

Data Processing Rules
Rule Sandbox