Data Types

A data type defines the structure of a data element in a model. In different notations, data types are attached to different constructs:

  • For workflows, in BPMN, data types define the structure of data objects (and data inputs/oututs), activity inputs and outputs, messages and signals.

  • For decisions, in DMN, data types define the structure of data inputs, the interface of invokable (decision service and business knowledge models) and the output of decisions.

  • For cases, in CMMN, data types define the structure of case file items.

  • For knowledge entity models, data types define the structure of terms.

FEEL Data Types

Trisotech uses FEEL data types from the DMN standard across its modeling and automation suite to define the data structure.

A data type can be of a simple type, a structure of types or a collection of types.

Simple Data 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.

Managing Data Types

Data types in a model are centrally managed in a dialog accessible in the notation ribbon under an action called Data Type.

data types
data types dialog

Each data type is listed in the Data Types dialog with some actions available on each of them.

Create collection

Create a collection of the data type.

Duplicate

Create a copy of the data type.

Details

Display the details of the data type.

Edit

Edit the data type.

Delete

Delete the data type.

Globally, there are actions that can be performed on data types.

Add

Create a new data type.

Sort A-Z

Sort the data type list alphabetically.

Delete

Delete all or unused data types. Delete all will remove all local types, all unused reused data types and all reused data types that are only used by other data types that can be deleted or by local element. Data types that are used by reused elements will not be removed.

Reuse from Graph

Reuse a data type from another model using the Digital Enterprise Graph.

Import XSD

Import one or more data types from XML XSD schemas. It is possible to import from multiple XSDs that import each other. Note that not all constraints expressed in an XSD can be mapped to data types. If some data types already exist in the model, we can replace or keep them. If we want to keep the data types that are in conflict, we must press the No button when the confirmation message appears and the import will continue. This action is undoable.

Import JSON

Import one or more data types from a JSON Schema. Note that not all constraints expressed in a JSON Schema can be mapped to data types. If some data types already exist in the model, we can replace or keep them. If we want to keep the data types that are in conflict, we must press the No button when the confirmation message appears and the import will continue. This action is undoable.

Defining a Data Type

When adding a new data type or editing an existing one, the dialog presents its structure and that structure can be edited.

data types define

To change the data type of a type or one of its attributes, clicking on the icon will offer different sources for the type.

Simple type

Select from one of the simple types.

Existing Type

Display a window with the data types that are already used by this model. This list can be searched.

Structure

Create a new data structure inline.

Reuse from graph

Select a data type already defined in another model from the Digital Enterprise Graph.

Reuse from accelerator

Select a data type already defined in an accelerator.

To add a new attribute to a structure, press the icon at the end of the last attribute.

Data types details can be expanded ( ) or collapsed ( ).

Attributes can be reordered using drag and drop.

Right-clicking on an attribute (or using the icon) brings up a contextual menu with localized actions.

Description

Enter a description for the data type or structure attribute.

Insert Row Above

Insert a new attribute row above the current row in a structure.

Insert Row Below

Insert a new attribute row below the current row in a structure.

Delete Row

Delete the current row in a structure.

Cut

Cut the current data type or structure attribute.

Copy

Copy the current data type or structure attribute.

Paste

Paste a data type.

Collection

Toggle the collection attribute of a data type or structure attribute. This displays the collection marker under the label of the data type or structure attribute ( ).

Refactor as a type

Transfor an inline-defined structure as a data type that can also be reused by other data types.

Adding constraints

Clicking on the type label of a data type or structure attribute (Text, Number, …​) or "Constraints…​" in the contextual menu of the data type, a dialog displays the constraints of that type.

data types constraint

The following type of constraints are available

Range

Number, Durations and Date/Time data types support entering a range of values.

Expression

A FEEL expression that defines the constraint on the type.

Enumeration

Most data type allows to enter an enumeration of allowed values for this data type.

Not null

The data type can never be set to null. Allowed on most data type.

For textual enumerations, you can paste multiple lines at once from a text file or even Microsoft Excel.

Optionals validation code and validation message can be entered for each constraint. It allows to show a custom error message when the constraint is not respected.

An "Allow null" checkbox can be checked for each constraint except the "Not Null" one.

Clicking the "Add Expression" button allows to enter an additional expression constraint that must be met along with the main one. To delete it, click on the at the top right.

To refer to the data type itself in an expression, use the question mark "?".

data types constraint 2

Siblings (same level) of a data type can be referred in an expression using its name.

data types constraint 3
data types constraint 4

Changing the constraint type to "None" will remove the main constraint. If there are additional expression constraints, the first one will be set as the main one.

Adding collection constraints

When a type is a collection, collection constraints can be defined by clicking at the icon in the namecell. The constraint will apply on the collection itself.

data types collection constraint

The following type of constraints are available

Size

Number of elements of the collection.

Expression

A FEEL expression that defines the constraint on the collection.

Not null

The collection can never be set to null.

Optionals validation code and validation message can also be entered for each constraint. It allows to show a custom error message when the constraint is not respected.

Clicking the "Add Constraint" button allows to enter an additional constraint that must be met along with the main one. The constraint could be Expression, Size or Not null ( Size and Not null are limited to one of each for a collection constraint). To delete it, click on the at the top right.

To refer to the collection itself in an expression, use the question mark "?".

Adding custom rendering

When a type is defined, custom rendering can be defined by clicking at the icon in the namecell and clicking on "Display…​" option.

The rendering will apply on the type itself when displayed in a form.

data types custom rendering
data types custom rendering configuration

The following options of custom rendering are available

Type Attribute Option

All

Default input value

FEEL expression

teams icon

When default input value is set, instead of being set to null, input value will be set to the default one.

If an enumeration is also set and default input value is listed, it will be filtered out in the enumeration and displayed as the default input value instead.

Output for missing value

FEEL expression

teams icon

Output for missing value is value displayed if value is set to null.

Widget name

Text

Allows user to target an input or an output based on this attribute to overload data rendering with user own widgets, instead of targeting it by data type name.

FEEL expression is evaluated when rendering a form.
Type Attribute Option

Boolean

True label

Replace true value by a more meaningful single word or phrase

teams icon

False label

Replace false value by a more meaningful single word or phrase

teams icon

Render input as

Select

teams icon

Radio buttons

teams icon

Checkboxes

Buttons

Switch

Render output as

Text

teams icon

Radio buttons

Checkboxes

Buttons

Switch

True label and false label are strings displayed in form. Value is still a boolean.
Type Attribute Option Requirement

Date

Input date pattern

Supported patterns are a combination of year representation (yyyy, YYYY, aaaa, AAAA), month representation (mm, MM) and day representation (dd, DD, jj, JJ) separated by either a '-' or a '/'.

Render input as

Select

teams icon

Buttons

Enumeration

Enumeration

Output date format

Full

teams icon

Long

teams icon

Medium

teams icon

Short

teams icon

Date and time

Render input with

Local time zone

Time zone picker

Time offset picker

Fixed time zone

Fixed time offset

No time zone picker

Render input as

Select

teams icon

Buttons

Enumeration

Enumeration

Input date pattern

Supported patterns are a combination of year representation (yyyy, YYYY, aaaa, AAAA), month representation (mm, MM) and day representation (dd, DD, jj, JJ) separated by either a '-' or a '/'.

Output date format

Full

teams icon

Long

teams icon

Medium

teams icon

Short

teams icon

Output time format

Full

teams icon

Long

teams icon

Medium

teams icon

Short

teams icon

12-hour time

Allows output to display time with or without AM/PM.

teams icon

Time

Render input with

Local time zone

Time zone picker

Time offset picker

Fixed time zone

Fixed time offset

No time zone picker

Render input as

Select

teams icon

Buttons

Enumeration

Enumeration

Output time format

Full

teams icon

Long

teams icon

Medium

teams icon

Short

teams icon

12-hour time

Allows output to display time with or without AM/PM.

teams icon

Display of date, date and time and time can differ based on browser and user settings.
Type Attribute Option Requirement

Number

Prefix

Allows to display a prefix before input or output

Suffix

Allows to display a suffix after input or output

Placeholder

Informational text

Render input as

Select

teams icon

Buttons

Enumeration

Enumeration

Render output as

Display mask

teams icon

Percentage

teams icon

Displayed value is fixed to 1 and appended with a '%'. A value less than 1 is multiplicated by 100 and fixed to 1 (e.g. 0.1 becomes 10.0%).

Display mask

Display mask

A mask is a combination of '#'. Each '#' is replaced by a number and spaces or extra characters between are displayed as is (e.g. ### ### and 123456 becomes 123 456)

Output scale

Set a number as a floating point number with n decimals

teams icon

Positive number

Render output as options are exclusive. Percentage and display mask options can not be combined.
Type Attribute Option Requirement

Text

Render input as

Text

teams icon

Textarea

teams icon

Select

teams icon

Autocomplete

Buttons

Email

Password

Phone number

URL

 

 

Enumeration

Enumeration

Enumeration

Textarea rows

Number of rows to display for a text area

Positive number

Textarea columns

Number of columns to display for a text area

Positive number

Placeholder

Informational text

Render output as

Text

teams icon

Preformatted text

HTML

Email

teams icon

Password

teams icon

URL

teams icon

 

 

 

 

 

URL caption

URL caption

Text displayed instead of URL. If not provided, URL is displayed by default

teams icon

Requirement is mandatory.

Requirement is not mandatory.