Skip to main content

DMN FEEL Handbook

This handbook serves as a comprehensive reference for the FEEL expression language from the DMN specification, as implemented within the Aletyx Enterprise Build of Kogito and Drools. The credit for this FEEL Handbook originates in the KIE Group™ Community found here and this guide was seen as an extension and further enhancement to it since the KIE Group has been transferred to Apache KIE and this is not yet a part of the Apache repositories.
Looking for an introduction to DMN?If you’re new to DMN, check out our Introduction to Decision Model and Notation (DMN) guide first!

What is DMN FEEL?

FEEL (Friendly Enough Expression Language) is the expression language defined in the Decision Model and Notation (DMN) standard. It provides business analysts, developers, and domain experts with a common language for expressing decision logic in a business-friendly way. FEEL was designed with these key principles:
  • Business-friendly syntax: Easy to read and write for non-programmers
  • Side-effect free: Expressions cannot modify external state
  • Simple data model: Works with common business data types (numbers, dates, strings, etc.)
  • Three-valued logic: Supports true, false, and null values for handling unknown/undefined states

Why Learn FEEL?

While there are many expression languages available, FEEL offers unique advantages for business decision modeling:
  1. Bridge between business and IT: Common language that both business analysts and developers can understand
  2. Standardized: Part of the OMG DMN specification, ensuring consistency across implementations
  3. Designed for decisions: Optimized specifically for decision logic with appropriate built-in functions
  4. Readable expressions: Logic expressed in a way that business stakeholders can validate
  5. Integration with DMN: Seamless use within decision tables, decision requirements diagrams, and other DMN elements

Quick Start Guide: Essential FEEL Concepts

If you’re new to FEEL or need a refresher, here are the key concepts to understand:

Basic Data Types and Literals

Simple Expressions

Decision Table Logic in FEEL

The power of FEEL becomes apparent in decision tables. For example, a loan approval decision table might use FEEL expressions like:
  • Input expression: applicant.creditScore
  • Input expression: applicant.debtToIncome
  • Output expression: if applicant.creditScore >= 700 and applicant.debtToIncome < 0.3 then "Approved" else "Declined"

Common Business Use Cases for FEEL

Getting Started with FEEL in Your Organization

  1. Start small: Begin with simple decision tables using basic FEEL expressions
  2. Practice with real examples: Convert existing business rules to FEEL expressions
  3. Use validation tools: Leverage DMN-compliant tools to check your FEEL syntax
  4. Build a library: Create a repository of common FEEL patterns for your organization
  5. Integrate with systems: Connect your DMN models to your business applications
In the following sections, we’ll explore FEEL in detail, covering data types, expressions, functions, and more complex patterns for decision modeling.

Introduction to FEEL Data Types

FEEL supports a rich set of data types designed to handle common business decision needs. Understanding these types helps you model your business domain accurately.

Number

Business Applications: Numbers in FEEL are used for quantities, monetary values, rates, scores, and metrics. Whether you’re calculating insurance premiums, interest rates, or inventory levels, the FEEL number type handles both integers and decimals with high precision. Numbers are based on the IEEE 754-2008 Decimal 128 format with 34 digits of precision, making them suitable for financial calculations where accuracy is critical. Technical Implementation: In Drools, FEEL numbers are represented as BigDecimals with MathContext DECIMAL128.
Business Consideration: FEEL Numbers PrecisionFEEL numbers provide higher precision than typical programming languages, which is crucial for financial calculations where rounding errors can have significant impacts.

String

Business Applications: Strings store text data such as names, descriptions, codes, addresses, and other non-numeric information. They’re essential for customer identity management, product descriptions, and document processing.
Business Consideration: Remember what an object’s data type is!String values need explicit comparison operations. "123" is different from the number 123, which matters when validating input from systems that may provide numeric identifiers as strings. If the input is a string, it will need to be converted to a number if you were to do an arithmetic operation on it!

Boolean

Business Applications: Boolean values represent yes/no or true/false conditions in business rules. They’re used for eligibility flags, compliance verification, feature toggles, and decision outcomes. FEEL uses three-valued logic, which adds the concept of null (unknown/undefined) alongside true and false. This is particularly useful in business scenarios where information might be missing or not applicable.

Date

Business Applications: Dates are used for deadlines, eligibility periods, contract terms, event scheduling, and age calculations. They’re essential in insurance rules, loan qualification, promotion periods, and compliance tracking. Date values have these accessible properties that are useful in business rules:

Time

Business Applications: Time values are critical for operating hours rules, shift differentials, service level agreements, peak/off-peak pricing, and international business coordination.

Date and Time

Business Applications: Combined date and time values are used for precise event timing, service level agreements, appointment scheduling, transaction timestamps, and shift scheduling.

Duration (Days and Time, Years and Months)

Business Applications: Durations represent time periods for contract terms, service intervals, aging calculations, SLA timeframes, and experience-based rules. FEEL supports two types of durations:
  1. Days and Time Duration - For precise intervals in days, hours, minutes, and seconds
  2. Years and Months Duration - For calendar-based periods like contract terms

Range (Interval)

Business Applications: Ranges define intervals for pricing tiers, risk levels, performance categories, acceptable thresholds, and eligibility brackets. They’re powerful tools for expressing business rules involving limits and boundaries. The brackets [ and ] indicate inclusive endpoints (closed intervals), while parentheses ( and ) indicate exclusive endpoints (open intervals). This precision is essential in business rules where boundary conditions matter.

List

Business Applications: Lists store collections of related items such as order line items, customer segments, product categories, or risk factors. They enable operations across multiple items, such as summing order values, finding maximum risk scores, or checking eligibility conditions.
Business Consideration: Indexes start at 1, not 0!In FEEL, list indexing starts at 1, not 0 as in many programming languages. This can be confusing for developers but is more natural for business users!

Context

Business Applications: Contexts are key-value structures that group related information, similar to JSON objects or dictionaries. They’re ideal for organizing complex decision outputs, creating structured results, and managing related data points. In DMN 1.4, powerful context functions were added (context(), context put(), context merge()) that make it easier to create and manipulate these structures. This is particularly valuable for progressive enrichment of customer profiles, order details, or application evaluations.

Function

Business Applications: Functions allow you to define reusable logic that can be applied in multiple contexts. They’re valuable for creating consistent calculation methods, standard assessment approaches, or modular decision components that can be shared across rules. Functions can be defined inline as shown above, or they can be defined in Business Knowledge Models (BKMs) within your DMN model for wider reuse. FEEL provides several expression types that form the building blocks of decision logic. Understanding these expressions is essential for creating effective business rules.

If Expression: Conditional Business Logic

The if expression is the fundamental building block for business rules, allowing you to express conditional logic in an intuitive way. It follows the structure if <condition> then <result1> else <result2>.
Important: The else part is always mandatory in FEEL expressions, unlike some programming languages. This forces explicit handling of all cases, which is a good practice for business rules where all scenarios should be accounted for.

For Expression: Iterative Processing

The for expression iterates over items in a list or range and produces a new list based on the iteration context. This is similar to list comprehension in functional programming languages but designed to be more approachable for business users. Business Applications:
  • Processing order line items
  • Calculating revenue by product category
  • Identifying customers matching specific criteria
  • Transforming raw data into business-friendly formats

Quantified Expressions: Verification Logic

Some: At Least One Match

The some expression checks if at least one element in a list or range satisfies a condition. This is particularly useful for flagging scenarios where a single match is significant. Business Applications:
  • Fraud detection (any suspicious transaction)
  • Compliance verification (any missing document)
  • Risk assessment (any critical risk factor present)
  • Eligibility checking (any qualifying condition)

Every: All Must Match

The every expression checks if all elements in a list or range satisfy a condition. This is essential for rules requiring universal compliance or complete verification. Business Applications:
  • Compliance verification (all requirements met)
  • Order fulfillment (all items available)
  • Application completeness (all fields provided)
  • Quality control (all tests passed)

In Expression: Range Checking

The in expression checks if a value falls within a specified range. This is a powerful tool for expressing business rules involving thresholds, limits, and acceptable values. Business Applications:
  • Credit score evaluation
  • Age verification
  • Pricing tiers
  • Performance metrics
  • Inventory management
  • Service level agreement monitoring
TipPay careful attention to inclusive [] vs. exclusive () range boundaries. This precision is crucial for business rules where boundary conditions matter, such as eligibility cutoffs.

Boolean Logic in Business Rules

FEEL supports three-valued logic with and and or operators, allowing for the modeling of complex business conditions. The three-valued approach handles unknown (null) values in addition to true and false. Truth Tables for Three-Valued Logic: AND Operator: OR Operator: !!! note “and and or precendence is important!

String Operations

String operations allow manipulation and validation of text data, which is common in business rules involving identifiers, codes, and human-readable information. Business Applications:
  • Data formatting for display
  • Validation of format-specific inputs
  • Extraction of components from complex strings
  • Pattern matching in text data

Arithmetic Operations

Arithmetic operations in FEEL follow standard mathematical conventions but with precise decimal handling for business calculations. Business Applications:
  • Financial calculations
  • Pricing models
  • Resource allocation
  • Performance metrics
  • Forecasting
String processing is essential for business rules involving product codes, customer information, addresses, and other text data. FEEL provides a comprehensive set of string functions to help with these common tasks.

Extracting and Manipulating String Data

These functions help you extract meaningful segments from business data strings:

String Testing and Validation

These functions let you validate string content against business rules:

String Transformation

These functions transform strings to meet business requirements:

Comprehensive String Function Reference

substring(string, start position, length?)

Returns the substring from the start position for the specified length. Position numbering starts at 1 for the first character. Parameters:
  • string: The source string
  • start position: Position to start from (1 = first character, negative numbers count from end)
  • length (Optional): Number of characters to include

string length(string)

Returns the number of characters in the string, useful for validation and formatting rules. Parameters:
  • string: The string to measure

upper case(string) and lower case(string)

Transform the case of all characters in the string, essential for standardization and case-insensitive comparison. Parameters:
  • string: The string to transform

substring before(string, match) and substring after(string, match)

Extract portions of text before or after a specific match, ideal for parsing structured text. Parameters:
  • string: The source string
  • match: The string to search for

replace(input, pattern, replacement, flags?)

Performs search and replace operations, supporting both simple text and regular expressions. Parameters:
  • input: Source string
  • pattern: Search pattern (can be regex)
  • replacement: Replacement text
  • flags (Optional): Regex flags like “i” for case-insensitive

matches(input, pattern, flags?)

Tests if a string matches a pattern, essential for format validation. Parameters:
  • input: String to test
  • pattern: Regular expression pattern
  • flags (Optional): Regex flags

split(string, delimiter)

Divides a string into a list based on a delimiter pattern. Parameters:
  • string: The string to split
  • delimiter: Regular expression pattern for splitting

string join(list, delimiter)

Combines list elements into a single string with the specified delimiter. Parameters:
  • list: List of strings to join
  • delimiter: String to insert between elements (optional)

Business Scenario Examples

Customer Data Formatting

Product Code Processing

Document and Reference Number Processing

These examples demonstrate how FEEL string functions can be combined to solve common business data processing challenges.

Quick Start Guide: The FEEL Essentials

If you’re new to FEEL or just need a refresher, here are the most essential concepts and functions to know. This section will help you get productive quickly with the most commonly used aspects of FEEL.

What Makes FEEL Different?

FEEL (Friendly Enough Expression Language) is designed as a common ground between business analysts, programmers, domain experts, and stakeholders. Its primary goal is to make decision logic approachable for all users while remaining powerful enough for complex business requirements. Key Characteristics:
  • Side-effect free - Expressions cannot modify external state
  • Simple data model - Works with numbers, dates, strings, lists, and contexts
  • Business-friendly syntax - Designed for a broad audience beyond just programmers
  • Three-valued logic - Supports true, false, and null values

Essential FEEL Expressions

Most Commonly Used FEEL Functions

FEEL Data Types in Business Context

FEEL supports a rich set of data types designed to handle common business decision needs. Understanding these types helps you model your business domain accurately.

Number

FEEL Number Examples
Business Applications: Numbers in FEEL are used for quantities, monetary values, rates, scores, and metrics. Whether you’re calculating insurance premiums, interest rates, or inventory levels, the FEEL number type handles both integers and decimals with high precision. Numbers are based on the IEEE 754-2008 Decimal 128 format with 34 digits of precision, making them suitable for financial calculations where accuracy is critical. They’re represented as BigDecimals with MathContext DECIMAL128.
Business ConsiderationFEEL numbers provide higher precision than typical programming languages, which is crucial for financial calculations where rounding errors can have significant impacts.

String

FEEL String Examples
Business Applications: Strings store text data such as names, descriptions, codes, addresses, and other non-numeric information. They’re essential for customer identity management, product descriptions, and document processing.
Business ConsiderationRemember that string values need explicit comparison operations. "123" is different from the number 123, which matters when validating input from systems that may provide numeric identifiers as strings.

Boolean

FEEL Boolean Examples
Business Applications: Boolean values represent yes/no or true/false conditions in business rules. They’re used for eligibility flags, compliance verification, feature toggles, and decision outcomes. FEEL uses three-valued logic, which adds the concept of null (unknown/undefined) alongside true and false. This is particularly useful in business scenarios where information might be missing or not applicable.

Date

FEEL Date Example with Business Context
Business Applications: Dates are used for deadlines, eligibility periods, contract terms, event scheduling, and age calculations. They’re essential in insurance rules, loan qualification, promotion periods, and compliance tracking. Date values have these accessible properties that are useful in business rules:

Time

FEEL Time Examples in Business Context
Business Applications: Time values are critical for operating hours rules, shift differentials, service level agreements, peak/off-peak pricing, and international business coordination.

Date and Time

Date and Time FEEL Examples in Business Context
Business Applications: Combined date and time values are used for precise event timing, service level agreements, appointment scheduling, transaction timestamps, and shift scheduling.

Duration (Days and Time, Years and Months)

Duration FEEL Examples in Business Context
Business Applications: Durations represent time periods for contract terms, service intervals, aging calculations, SLA timeframes, and experience-based rules. FEEL supports two types of durations:
  1. Days and Time Duration - For precise intervals in days, hours, minutes, and seconds
  2. Years and Months Duration - For calendar-based periods like contract terms

Range (Interval)

FEEL Range/Interval Examples in Business Context
Business Applications: Ranges define intervals for pricing tiers, risk levels, performance categories, acceptable thresholds, and eligibility brackets. They’re powerful tools for expressing business rules involving limits and boundaries. The brackets [ and ] indicate inclusive endpoints (closed intervals), while parentheses ( and ) indicate exclusive endpoints (open intervals). This precision is essential in business rules where boundary conditions matter.

List

FEEL List Examples in Business Context
Business Applications: Lists store collections of related items such as order line items, customer segments, product categories, or risk factors. They enable operations across multiple items, such as summing order values, finding maximum risk scores, or checking eligibility conditions.
Business ConsiderationIn FEEL, list indexing starts at 1, not 0 as in many programming languages. This can be confusing for developers but is more natural for business users.

Context

FEEL Context Examples in Business Context
Business Applications: Contexts are key-value structures that group related information, similar to JSON objects or dictionaries. They’re ideal for organizing complex decision outputs, creating structured results, and managing related data points. In DMN 1.4, powerful context functions were added (context(), context put(), context merge()) that make it easier to create and manipulate these structures. This is particularly valuable for progressive enrichment of customer profiles, order details, or application evaluations.

Core FEEL Expressions for Business Logic

FEEL provides several expression types that form the building blocks of decision logic. Understanding these expressions is essential for creating effective business rules.

If Expression: Conditional Business Logic

If Expression in Business Context
The if expression is the fundamental building block for business rules, allowing you to express conditional logic in an intuitive way. It follows the structure if <condition> then <result1> else <result2>.
Business Rule ConsiderationThe else part is always mandatory in FEEL expressions, unlike some programming languages. This forces explicit handling of all cases, which is a good practice for business rules where all scenarios should be accounted for.

For Expression: Iterative Processing

For Expression in Business Context
The for expression iterates over items in a list or range and produces a new list based on the iteration context. This is similar to list comprehension in functional programming languages but designed to be more approachable for business users. Business Applications:
  • Processing order line items
  • Calculating revenue by product category
  • Identifying customers matching specific criteria
  • Transforming raw data into business-friendly formats

Quantified Expressions: Verification Logic

Some: At Least One Match

Using “Some” in Business Rules
The some expression checks if at least one element in a list or range satisfies a condition. This is particularly useful for flagging scenarios where a single match is significant. Business Applications:
  • Fraud detection (any suspicious transaction)
  • Compliance verification (any missing document)
  • Risk assessment (any critical risk factor present)
  • Eligibility checking (any qualifying condition)

Every: All Must Match

Using “Every” in Business Rules
The every expression checks if all elements in a list or range satisfy a condition. This is essential for rules requiring universal compliance or complete verification. Business Applications:
  • Compliance verification (all requirements met)
  • Order fulfillment (all items available)
  • Application completeness (all fields provided)
  • Quality control (all tests passed)

In Expression: Range Checking

Range Checking in Business Rules
The in expression checks if a value falls within a specified range. This is a powerful tool for expressing business rules involving thresholds, limits, and acceptable values. Business Applications:
  • Credit score evaluation
  • Age verification
  • Pricing tiers
  • Performance metrics
  • Inventory management
  • Service level agreement monitoring
Business Rule TipPay careful attention to inclusive [] vs. exclusive () range boundaries. This precision is crucial for business rules where boundary conditions matter, such as eligibility cutoffs.

Boolean Logic in Business Rules

Boolean Logic in Business Context
FEEL supports three-valued logic with and and or operators, allowing for the modeling of complex business conditions. The three-valued approach handles unknown (null) values in addition to true and false. Truth Tables for Three-Valued Logic: AND Operator: OR Operator:
Precedence Ruleand has higher precedence than or. Use parentheses when combining operations to ensure the intended evaluation order.

String Functions for Business Data Processing

String processing is essential for business rules involving product codes, customer information, addresses, and other text data. FEEL provides a comprehensive set of string functions to help with these common tasks.

Extracting and Manipulating String Data

String Extraction Functions in Business Context
These functions help you extract meaningful segments from business data strings:

String Testing and Validation

String Validation in Business Rules
These functions let you validate string content against business rules:

String Transformation

String Transformation for Business Data
These functions transform strings to meet business requirements:

List Functions for Collection Processing

Business decisions often involve processing collections of items, such as order lines, customer segments, or transaction histories. FEEL provides powerful functions to analyze and manipulate these collections.

Basic List Operations

Essential List Functions in Business Context
These fundamental list functions help analyze collections of business data:

List Modification and Creation

List Manipulation in Business Scenarios
These functions help create and modify lists for business processing:

List Analysis and Filtering

Advanced List Analysis for Business Intelligence
These advanced list functions support sophisticated business analysis:

Statistical Functions for Business Analytics

Statistical Analysis for Business Metrics
These statistical functions are valuable for business analytics:

Context Functions for Complex Data Structures

Added in DMN 1.4, context functions provide powerful capabilities for working with structured business data like customer profiles, product configurations, and application states.

Context Creation and Modification

Building and Updating Contexts for Business Data
These functions revolutionize how you work with structured data in FEEL:

Context Inspection and Extraction

Analyzing Context Data for Business Processing
These functions help you safely access and process structured data:
Business Process AdvantageContext functions introduced in DMN 1.4 eliminate the need for complex iterations and manual key checks. They’re particularly valuable when progressively building complex decision outputs or handling configuration layers.

Range Functions for Temporal and Sequential Business Logic

Range functions offer sophisticated ways to express relationships between time periods, numerical ranges, and sequences. These are particularly valuable for business rules involving schedules, eligibility periods, and process sequences.

Temporal Relationship Analysis

Analyzing Time Relationships in Business Processes

FEEL Data Types Reference Material

FEEL supports the following data types:

FEEL Values in Detail

Number

FEEL Number Examples
Numbers in FEEL are based on the IEEE 754-2008 Decimal 128 format, with 34 digits of precision. Internally, they’re represented as BigDecimals with MathContext DECIMAL128. FEEL supports only one number data type, used for both integers and floating point numbers, there isn’t a distinction between these and the numerical accuracy seen in different types of Java integers/numbers/decimals/etc should be treated as a BigDecimal function. FEEL numbers use a dot (.) as a decimal separator and don’t support -INF, +INF, or NaN. Invalid numbers are represented as null. The Aletyx Enterprise Build of Drools extends the DMN specification with additional number notations:
  • Scientific notation: 1.2e3 (equivalent to 1.2*10**3)
  • Hexadecimal: 0xff (equivalent to decimal 255)
  • Type suffixes: f, F, d, D, l, L (ignored but allowed for compatibility)

String

FEEL String Examples
Strings in FEEL are any sequence of characters delimited by double quotation marks. Similar rules to programming languages in that "123" is different than 123 - so if you need to parse out parts of the string, functions will need to be used to do so.

Boolean

FEEL Boolean Examples
FEEL uses three-valued logic, so a boolean expression may evaluate to true, false, or null.

Date

FEEL Date Example

Date Properties

Date literals aren’t directly supported in FEEL, but you can construct date values using the built-in date() function. Date strings follow the format defined in XML Schema: "YYYY-MM-DD". Date values have these accessible properties: Accessing Date Properties in FEEL

Time

FEEL Time Examples

Accessing Properties of Time

Time literals aren’t directly supported, but you can construct time values using the time() function. Time strings follow XML Schema format: "hh:mm:ss[.uuu][(+-)hh:mm]". Time values have these accessible properties: Accessing Time Properties with FEEL

Date and Time

Date and Time FEEL Examples

Accessing Date and Time Properties

Date and time values combine both date and time information. They can be created using the date and time() function with the format "<date>T<time>". Date and time values have these accessible properties: Properties

Days and Time Duration

Days and Time Duration FEEL Examples

Accessing Day and Time Duration Properties in FEEL

Days and time duration values represent periods of time in days, hours, minutes, and seconds. They can be created using the duration() function with strings that follow the XML Schema duration format. Days and time duration values have these accessible properties: Accessing Duration Properties in FEEL

Years and Months Duration

Years and Months Duration FEEL Examples

Accessing Year and Months Duration Properties

Years and months duration values represent periods of time in years and months. They can be created using the duration() function with strings that follow the XML Schema duration format, but only with year and month components. Years and months duration values have these accessible properties: Access Duration Years and Months Properties

Function

FEEL Function Example
FEEL supports function literals (anonymous functions) that let you create functions on the fly. The example creates a function that adds parameters a and b and returns the result.

Context

FEEL Context Example
Contexts in FEEL are collections of key-value pairs, similar to maps or dictionaries in other languages.

Understanding FEEL Context Literals

FEEL has context literals that you can use to create contexts. A context in FEEL is a list of key and value pairs, similar to maps in languages like Java. In the example, the expression creates a context with two entries, x and y, representing a coordinate in a chart. In DMN 1.2, another way to create contexts is to create an item definition that contains the list of keys as attributes, and then declare the variable as having that item definition type.

Java Implementation in Drools DMN API

The Drools DMN API supports DMN ItemDefinition structural types in a DMNContext in two ways:
  • User-defined Java type: Must be a valid JavaBeans object defining properties and getters for each of the components in the DMN ItemDefinition. If necessary, you can also use the @FEELProperty annotation for those getters representing a component name which would result in an invalid Java identifier.
  • java.util.Map interface: The map needs to define the appropriate entries, with the keys corresponding to the component name in the DMN ItemDefinition.

New Context Functions since DMN 1.2

Several new context functions were added in DMN 1.4, with the most useful being context put(). Before this function, adding a column to a table required iterating a context BKM with one context entry per column creating more complex implementations than should’ve been required. DMN 1.4 introduced three new built-in functions for contexts: context(), context put(), and context merge(). These functions make it easier to create and manipulate contexts:
  • context() - Takes a list of key-value pairs and creates a context with those entries
  • context put() - Adds or updates a key-value pair in an existing context
  • context merge() - Combines multiple contexts into a single context

Range (Interval)

FEEL Range Interval Examples

Examples of Range

FEEL Properties of Range

Ranges represent intervals of values. The brackets [ and ] indicate inclusive endpoints (closed intervals), while parentheses ( and ) indicate exclusive endpoints (open intervals). Range values have these accessible properties: Accessing Properties of Ranges in FEEL

List

FEEL List Example

List Indexing

Lists contain ordered collections of items. In FEEL, you can create lists using square brackets with comma-separated values. Elements in a list can be accessed by index, with the first element at index 1: FEEL List Indexing

List Negative Indexing

Negative indexes access elements from the end of the list: FEEL List Negative Indexing

FEEL Expressions

FEEL provides several expression types that form the building blocks of decision logic.

If Expression

Examples Utilizing If Expression in FEEL
The if expression works like the classic if-then-else operator in other languages. The else part is always mandatory in FEEL.
WarningThe else part is always mandatory in FEEL expressions.

For Expression

Utilizing the For Expression in Feel Examples
The for expression iterates over items in a list or range and produces a new list based on the iteration context. This is similar to list comprehension in functional programming languages.

Quantified Expressions

Some

Utilizing the Some Expression in FEEL Examples
The some expression checks if at least one element in a list or range satisfies a condition. This allows for determining if at least item in the expression list meets the conditions.

Every

Utilizing the Every Expression in FEEL Examples
The every expression checks if all elements in a list or range satisfy a condition. Every element must match to be evaluated as true.

In Expression

Utilization of the In Expression Examples
The in expression checks if a value falls within a specified range. With the in expression, it is very important if ranges are used to be aware of the use of inclusive [] or exclusive ().

Boolean Logic

Using Boolean Logic in FEEL Examples
FEEL supports three-valued logic with and and or operators. Note that and has higher precedence than or.

String Concatenation

String Concatenation FEEL Examples
String concatenation in FEEL is done using the + operator. This allows building larger strings or merging statements together.

String Functions

This section covers the built-in functions for working with strings in FEEL.

substring(string, start position, length?)

Substring FEEL Examples
Returns the substring from the start position for the specified length. The first character is at position value 1.
NoteIn FEEL, Unicode characters are counted based on their code points.

string length(string)

String Length FEEL Examples
Calculates the length of the specified string.

upper case(string)

Transforming Strings to Upper Case in FEEL Example
Produces an uppercase version of the specified string.

lower case(string)

Transforming Strings to Lower Case in FEEL Example
Produces a lowercase version of the specified string.

substring before(string, match)

Using Substring Before in FEEL Examples
Calculates the substring before the match.

substring after(string, match)

Using Substring After in FEEL Examples
Calculates the substring after the match.

replace(input, pattern, replacement, flags?)

Using the Replace Function in FEEL Examples
Calculates the regular expression replacement.
NoteThis function uses regular expression parameters as defined in XQuery 1.0 and XPath 2.0 Functions and Operators.

contains(string, match)

Using the Contains Expression in FEEL Example
Returns true if the string contains the match.

starts with(string, match)

Using the Starts With Function in FEEL Example
Returns true if the string starts with the match.

ends with(string, match)

Example
Returns true if the string ends with the match.

matches(input, pattern, flags?)

Using the Matches Fucntion in FEEL Example
Returns true if the input matches the regular expression.
NoteThis function uses regular expression parameters as defined in XQuery 1.0 and XPath 2.0 Functions and Operators.

split(string, delimiter)

Using the Split Function in FEEL Examples
Returns a list of the original string split at the delimiter regular expression pattern.
NoteThis function uses regular expression parameters as defined in XQuery 1.0 and XPath 2.0 Functions and Operators.

string join(list, delimiter)

Using the String Join in List FEEL Function Examples
Returns a string which is composed by joining all the string elements from the list parameter, separated by the delimiter. The delimiter can be an empty string. Null elements in the list parameter are ignored. If list is empty, the result is the empty string. If delimiter is null, the string elements are joined without a separator.

string join(list)

String Join Function in FEEL Example
Returns a string which is composed by joining all the string elements from the list parameter. Null elements in the list parameter are ignored. If list is empty, the result is the empty string.

List Functions

This section covers the built-in functions for working with lists in FEEL.
NoteIn FEEL, the index of the first element in a list is 1. The index of the last element in a list can be identified as -1.

list contains(list, element)

FEEL List Contains Function in FEEL Example
Returns true if the list contains the element.