Datatypes
A datatype can be a simple type, a structured type or a collection of items of the same type. FEEL defines a number of simple base types, and in the Trisotech platform, collections of these are also considered built-in types.
FEEL Built-In Types
Text |
An ordered sequence of Unicode characters. |
Number |
A numeric value. There is no difference between integer and floating point, a single type represents both. |
Boolean |
A true or false value. |
Days and time duration |
A duration expressed using a number of days, hours, minutes and seconds. |
Years and months duration |
A duration expressed using years and months. |
Date and time |
A date and time value that can be expressed using an optional offset from the Universal Coordinated Time (UTC). |
Date |
A date value. |
Time |
A time value. |
File |
A structured data type that represents unstructured data as a file. The file data type has the following attributes: name, extension, created, modified, size, type, author, url. Note that this is not a FEEL defined type. |
Folder |
A structured data type that represents unstructured data as a folder. Available only in Case Modeler. The folder data type has the following attributes: name, created, author, files, folders. Note that this is not a FEEL defined type. |
Any |
Represents any structured data type in an abstract manner. |
Collection of Text |
Collection of text items. |
Collection of Number |
Collection of number items. |
Collection of Boolean |
Collection of boolean items. |
Collection of Days and time duration |
Collection of days and time duration items. |
Collection of Years and months duration |
Collection of years and months items. |
Collection of Date and time |
Collection of date and time items. |
Collection of Date |
Collection of date items. |
Collection of Time |
Collection of time items. |
Collection of File |
Collection of file items. Note that this is not a FEEL defined type. |
Base Type Examples
Name |
Description |
Expression → Value |
String (Text) |
text enclosed in quotes or italicized |
“Trisotech” or Trisotech → Trisotech |
Boolean |
two possible values true or false. |
1=1 → true, 1=0 → false |
Number |
numerical value. |
sqrt(4) → 2 |
Date |
YYYY-MM-DD format written in bold italic or as a function parameter string. |
2017-11-27 or date(“2017-11-27”) → November 27, 2017 |
Time |
HH:MM:SS format written in bold italic or as a function parameter string. |
09:12:00 or time(“09:12:00”) → 9:12 am local time |
Date and Time |
YYYY-MM-DDTHH:MM:SS format written in bold italic or as a function parameter string |
2017-11-27T09:12:00 or date and time(“2017-11-27T09:12:00”) → 9:12 am local time, November 27, 2017 |
Duration |
P[n]Y[n]M[n]DT[n]H[n]M[n]S format where [n] is a number written in bold italic or as a function parameter string. |
duration(“PT15M”) → 15 minutes duration; duration(“P3M1D”) → 3 months, 1 day duration |
Null |
missing or invalid value |
sqrt(“x”) → null |
User-Defined Types
In addition, users can define custom types called item definitions, which include:
-
Built-in types with constraints
-
Structured types including components. A component may be a simple type, a collection, or another structured type.
-
Collections of any defined type
The item definitions available in the model are listed in the DMN ribbon, under Data Types.