Friendly Enough Expression Language, or FEEL, is a new standard promoted by the OMG (Object Management Group). The DCR Process Engine has implemented a subset of the FEEL langage as it\'s [expression language](https://documentation.dcr.design/documentation/engine-expression-language/). Please check the version of the engine using [this example graph](https://documentation.dcr.design/example/dcr-process-engine-version/) in order to check if the function needed is available in the DCR Process Engine within your IT system.
The FEEL function and attribute names cannot be used as activity ids so take care when creating activity ids. The full list of reserved words can be found [here](https://documentation.dcr.design/documentation/engine-expression-language-reserved-keywords/) but it is currently not enforced by the portal.
## FEEL functions currently supported
Where applicable click on the function to go to an example graph using the function.
| name | version | description | example |
| ----- | ----- | ----- | ----- |
| __date_selector | 3.10.0 | select
component (year, month, weekday, day, hour, minute) of
date | |
| __duration_selector | 3.10.0 | select
component (years, months, days, hours, minutes) of
duration | |
| append | 4.8.0 | return
list with items appended | |
| ceiling |
| | |
| concatenate | 4.8.0 | return the concatenation of the argument lists | |
| contains | 4.16.0 | does string contain match? | contains("foobar","oba") = true |
| count | 4.8.0 | return the number of elements in list | |
| date | | | |
| datediff | 3.11.0 | return the duration from date1 to date2 | |
| duration | 4.13.2 | interpret string as a duration or fail | |
| exp | 4.13.2 | return e to the power of n | |
| floor | | | |
| index | 5.0.0 | return the k'th element of list | |
| index of | 5.7.0 | return all indices of list where item occurs | |
| instance of | 4.16.2 | is x an instance of type? | instance of (2+4, number) = true,
instance of (2+4,String) = false,
instance of (2+"4",String) = true |
| json | 4.12.2 | follow path through list | json("A[0].B", [ ["A", [ ["B", 1] ] ] ] == 1 |
| json get bool | 5.0.3 | return value at the end of path in json as boolean or fail | |
| json get field | 5.0.3 | retrieve field at end of path as string | |
| json get float | 5.0.3 | return value at the end of path in json as float or fail | |
| json get int | 5.0.3 | return value at the end of path in json as integer or fail | |
| json get keys | 5.0.3 | interpret json object as list of keys | |
| json get list | 5.0.3 | interpret json array as list | |
| json get string | 5.0.3 | return value at the end of path in json as string or fail | |
| list contains | 4.8.0 | does list contain item? | |
| log | 4.13.2 | return natural logarithm of n | |
| month duration | 5.7.0 | compute duration in months from date1 to date2 | |
| months duration | 5.7.0 | compute duration in months from date1 to date2 | |
| number | 3.10.0 | interpret string as number | number("24") = 24 |
| remove | 4.15.0 | remove element at position index from list | |
| round | | | |
| sort | 5.7.0 | sort list acendingly | |
| sqrt | 4.13.2 | return the square root of x | |
| string | 3.10.0 | convert x to string | string(24) = "24" |
| string join | | | |
| string length | 4.13.2 | return the length of string | string lenght("foobar") = 6 |
| substring | | | |
| substring after | 5.0.1 | return the part of string succeeding last occurrence of match | substring after("this is ok","is") = " ok" |
| substring before | 5.0.1 | return the part of string preceding first occurrence of match | substring before("this is ok","is") = "this " |
| union | 5.0.3 | concatenate all sub-lists of list, removing duplicates | |
| workday | 4.3.0 | return a working-day duration of k days | |
| xml get bool | 5.0.3 | return value at the end of xpath in xml as bool or fail | |
| xml get float | 5.0.3 | return value at the end of xpath in xml as double or fail | |
| xml get int | 5.0.3 | return value at the end of xpath in xml as integer or fail | |
| xml get list | 5.0.3 | return value at the end of xpath in xml as list of xml (strings) or fail | |
| xml get string | 5.0.3 | return value at the end xpath in xml as string or fail | |
| xml get xml | 5.0.3 | return value at the end of xpath in xml as string or fail | |
| year and month duration | 5.7.0 | compute duration from date1 to date2 in years and months | |
| year and months duration | 5.7.0 | compute duration from date1 to date2 in years and months | |
| year duration | 5.7.0 | compute duration in years from date1 to date2 | |
| years and month duration | 5.7.0 | compute duration from date1 to date2 in years and months | |
| years and months duration | 5.7.0 | compute duration from date1 to date2 in years and months | |
| years duration | 5.7.0 | compute duration in years from date1 to date2 | |
[Visit this example to see FEEL string functions](https://documentation.dcr.design/example/feel-string-functions/).
[Visit this example to see FEEL date functions](https://documentation.dcr.design/example/feel-date-functions/).
[Visit this example to see FEEL list functions.](https://documentation.dcr.design/example/feel-list-functions/)
[Visit this example to see FEEL map function.](https://documentation.dcr.design/example/feel-map-function/)
## FEEL attributes currently supported
| Attribute | description | version |
|-----------|-------------|---------|
| datetime.year | Return the integer value of the year for the datetime | 3.10.0 |
| datetime.month | Return the integer value of the month for the datetime | 3.10.0 |
| datetime.weekday | Return the string description of the weekday that the datetime represent | 3.10.0 |
| datetime.day | Return the day of the date as an integer. | 3.10.0 |
| datetime.hour | Returns the integer value of the hour that the datetime represent | 3.10.0 |
| datetime.minute | Returns the integer value of the minute that the datetime represent | 3.10.0 |
| duration.years | Returns the integer representation of the years in the duration | 3.10.0 |
| duration.months | Returns the integer representation of the months in the duration | 3.10.0 |
| duration.days | Returns the integer representation of the days in the duration | 3.10.0 |
| duration.hours | Returns the integer representation of the hours in the duration | 3.10.0 |
| duration.minutes | Returns the integer representation of the minutes in the duration | 3.10.0 |
[Visit this example to experiment with FEEL attributes](https://documentation.dcr.design/example/feel-attributes/).
## FEEL lists
The DCR Process Engine 4.8.0 introduces support for FEEL lists.
An example FEEL list of the numbers 1, 2 and 3 is written in this way:
```
<pre class="wp-block-code">```
[1, 2, 3, 4]
```
```
In a similar manner a FEEL list of strings can be written as:
```
```
[Norway, Sweden, Denmark, Finland] or [NO, SE, DK, FI]
```
```
index(, ) --> in list
list contains(, ) --> true | false
count() --> integer value with the number of elements in the list
append(,) --> returns a new list where the element is appended to the list
concatenate(,) --> returns a new list where the two lists are concatenated.
map(, function) --> returns a new list where the function have been applied to each element in the original list.
[Visit this example to see FEEL list functions](https://documentation.dcr.design/example/feel-list-functions/).
## Rounding up and down a duration
Please take a look of this [example](https://documentation.dcr.design/example/feel-floor-and-ceiling-of-a-duration/) about how to use the FEEL functions ceiling and floor on durations. FEEL does not require ceiling and floor on duration, but only on integer and floating point values. We\'ve often seen the need to round up a duration found during process mining, e.g. changing P7DT6H5M13S into P8D for a deadline to make the model more readable.