Custom Logic

This page describes the Custom Logic Blocks in more detail

Introduction

A Custom Logic Block can be used to evaluate complex logic that can not be implemented with a simple comparison block.

A set of example logic blocks can be found here:

This webinar explains how to create Custom Rules:

Webinar about how to create Custom Rules

Overview

Custom Logic Blocks allow the implementation of more complex business logic with the akenza Rule Engine. They enable simple stateless and stateful operations upon rule trigger using custom scripts in Javascript. Custom Logic Blocks are created on organization-level and are therefore available in all workspaces and can be selected when creating a rule.

A Custom Logic Block consists of a definition of:

  • Inputs: the dynamic data that is evaluated during script execution (sensor data)

  • Parameters: constant values like thresholds

  • A script used to run the logic

In order to keep its usage consistent, it is not possible to edit custom logic inputs and parameters if the Custom Logic Block is assigned to an active rule.

Inputs

Inputs specify the input data sources for a Custom Logic Block and contain the dynamic data of a device. At least one input needs to be defined in order to create a Custom Logic Block.

Field

Description

Input display/ label name

The input name

Input description

An optional description

Input variable name

A variable name used to access the value inside the script

Default topic

An optional default topic that is preselected when using the logic block

Default data key

An optional default data key that is preselected when using the logic block

Parameters

Parameters represent static properties that are available during script runtime.

Field

Description

Parameter display/label name

The parameter name

Parameter variable name

A variable name used to access the parameter inside the script

Parameter Type

The data type of the parameter; Numerical, String, or Boolean

Default value

A default value for the parameter

Script

Logic Block Scripting

Last updated

Was this helpful?