Prev | Next |
ItemDefinitions and Data Sets
An ItemDefinition describes the types and structures of data items used in a Decision model. It serves as the data type definition for InputData elements, Decision elements and Business Knowledge Model parameters. An ItemDefinition can also define data sets that provide sets of values for use in DMN Simulations. Switching between different data sets provides the ability to do 'what-if' analysis using the Decision model.
ItemDefinition Structure
A complex ItemDefinition consists of nested elements. For example, tApplicantData is structured as:
The tApplicantData ItemDefinition example is a composite type of five child items. 'Monthly' is composed of three children (Expenses, Income and Repayments). The Leaf components (non-composite), will have a primitive type such as number, string or Boolean.
Data Set
The ItemDefinition's Data Set can be viewed and edited using the icon on the Toolbar. With the 'Edit Data Set' dialog, you can add, delete and duplicate the data sets. There is also support for CSV import and export of data sets.
As shown in the example, the ItemDefinition for tApplicantData defines three data sets:
- default
- Income4000
- Income5000
Each data set can be viewed in an InputData element that is typed to the ItemDefinition. For example the 'Applicant Data' InputData element is typed to the 'tApplicantData' ItemDefinition. The DMN Expression window for 'Applicant Data', illustrated here, shows the data values according to the data set selected in the drop-down list in the window toolbar (Income5000 in this case).
Setting a Reference to an ItemDefinition
A DMN InputData element is set to be referenced (typed) by an ItemDefinition using either:
- The icon on the DMN Expression window of the InputData element or
- Selecting the InputData element and pressing to select the ItemDefinition from the dialog
There are other cases of using ItemDefinitions; for instance, when setting the type for an Input Parameter in a BKM or an output parameter in a Decision Table.