Range

Overview

The Range Filter Component checks whether a given input data falls within a specified range. If the condition is met, the message is passed through the inRange port; otherwise, it is routed to notInRange.

Usage

This component is used to validate whether a text, number, or date is within a predefined range, making it useful for conditional processing in workflows.

Properties

Property
Type
Description

sourceData

string

The data to be checked. Can be a number or date.

rangeMin

string

The minimum value of the range.

rangeMax

string

The maximum value of the range.

exclusiveMin

boolean

If true, the minimum value is excluded from the range.

exclusiveMax

boolean

If true, the maximum value is excluded from the range.

Input Ports

Port
Description

in

Accepts input data and the range values for comparison.

Output Ports

Port
Description

inRange

Emits the message if sourceData is within the specified range.

notInRange

Emits the message if sourceData is outside the specified range.

Processing Logic

  1. Receives Input Data:

    • Accepts a dataset (sourceData), minimum (rangeMin), and maximum (rangeMax) values.

  2. Checks for Range Inclusion:

    • If both values are numbers, compares them numerically.

    • If both values are dates, checks if sourceData falls within the given range.

    • If exclusiveMin or exclusiveMax is set to true, strict range checks are applied.

  3. Routes the Message:

    • If sourceData falls within the range, it is passed to the inRange port.

    • Otherwise, it is passed to the notInRange port.

Output Data Schema

Property
Type
Description

sourceData

string

The original data that was checked.

rangeMin

string

The minimum value of the range.

rangeMax

string

The maximum value of the range.

result

boolean

true if sourceData is within the range, otherwise false.

Notes

  • Supports Numeric & Date Comparisons: Compares numbers and dates effectively.

  • Configurable Exclusive Boundaries: Allows users to include or exclude boundary values.

  • Ideal for Conditional Filtering: Useful in workflows requiring validation of a value within a specific range.

This component is essential for workflows that need to filter or route messages based on whether a value falls within a predefined range.

Last updated

Was this helpful?