The Friendly Enough Expression Language (FEEL), the core expression language for Decision Model and Notation(DMN), relies heavily on array operations to define business decision logic. This article explores particular ways to use FEEL Array operations in different DMN decision-modelling scenarios. And also, we use built-in List functions available in DMN, which we discussed in this guide.

What Is a FEEL Array?

A FEEL Array is an ordered collection of values in brackets, for example, [1,2,3] or [“Apple”, “Banana”, “Cherry”]. FEEL Arrays can be used directly in inputs, decision tables, literal expressions, and more. They are essential for handling lists and sets of data in most DMN decision models.

Use Cases for FEEL Array in DMN

We can check the lists based on the different conditions by using the FEEL expression.

Checking lists where at least one requirement met a condition. In this scenario, we used the some-in-satisfies FEEL expression.

some x in [2,4,6,8] satisfies x>5
result: True

Checking lists to see if all requirements were met. In this scenario, we used the every-in-satisfies FEEL expression.

every x in [2,4,6,8] satisfies x>5
result: False

Evaluating lists and returning the items that meet specific conditions. In this scenario, we used the for-in-return FEEL expression.

for x in [2,4,6,8] return x-1
result: [1,3,5,7]

Feel array expression has a simple way of filtering lists.

[4,6,18,71][2]
result: [6]

[4,6,18,71][item > 10]
result: [18,71]

Summary

You can use Friendly Enough Expression Language Array expressions in your DMN models in many ways, not limited to the above use cases. Combining Array Feel expressions with built-in Array functions enhances the business decision modeling capability in DMN.