The DMN engine supports basic types which can be extended by custom types.
Supported Data Types
The following types are supported by the DMN engine:
Each data type transformer produces a typed value which contains the value andadditional type informations.
If the given type does not match one of the above types then the value istransformed into an untyped value by default.
If you prefer another format or different representation of a date,implement a custom type and replace the default transformer.
Setting the Data Type of an Input
The type of a decision table input is specified by the attribute on theinputExpression
element.
Setting the Data Type of an Output
The type of a decision table output is specified by the typeRef
attribute on the element.
Setting the Data Type of a Variable
The type of a decision literal expression result is specified by the typeRef
attribute on the variable
element.
Implement a Custom Data Type
The default data types of the DMN engine can be extended or replaced by customtypes. For example, you can add a new type for time or change thetransformation to support a different date format or localized booleanconstants.
To do this, implement a new . The transformation is processed in the method and returns a typed value. If it cannot successfully transform a value,it must throw an IllegalArgumentException
.
To use this data type transformer in the DMN engine, add it to theDMN engine configuration.