File Structure of JSON Format
Decision Tables exported or imported in JSON format require certain mandatory attributes to maintain a consistent structure. Below are the required and optional components of a decision table JSON file.
Mandatory Elements
name
: name of the decision table;type
: always"decision-table"
for decision tables;status
: the current state of the decision table ("published
" or "pending
");inputSchema
: describes the input variables of the decision table. Each variable should be defined as an object, which can hold different attributes or substructures;outputSchema
: describes the expected output variables from the decision tabledecisionTable
: contains the rule itself:columns
: defines the different types of columns in the table, such as input (conditions), calculation, and result columns;condition
: condition columns specify the criteria that inputs need to meet;calculation
: columns that calculate values based on the input or other conditions;columnOutput
: defines the result of the decision table based on the calculations or conditions;
rows
: rows of the decision table;cells
: each row contains cells, which correspond to the column definitions, and they hold specific values or functions applied to the data;active:
a boolean attribute that defines if a row is active (true) or not;
Optional Elements
description
: a textual description of the decision table;ruleAlias
: an alias for the rule. If this is left as an empty string, the system will generate one automatically upon import;createdIn
: the date and time of the rule's creation, following the ISO 8601 format. If left empty, this will be generated automatically upon import;lastUpdate
: the date and time of the last update, also in ISO 8601 format. If empty, it will be automatically generated upon import;tags
: an array containing tags for categorizing the rule. It may be an empty array;visualData
: contains information about the visual presentation of the columns, including:columns
: an array where each object contains:columnId
: the unique identifier for the column (string);width
: the width of the column in the UI (number);
auditLog
: specifies the audit logging configuration;active
: defines whether audit logging is active;debug
: contains a nested attributeactive
, which controls whether debug logging is enabled;ttl
: time to live (in days) for the audit logs (optional, with a default of 14 days).
Examples
Minimal File Structure Example:
File Structure Example:
Conclusion
When working with Decision Tables in JSON format, it's crucial to adhere to the structure, ensuring that mandatory elements like name
, type
, status
, and schemas are defined. Optional elements such as descriptions, audit logs, and visual data offer flexibility and can improve clarity and management. By following these guidelines, users can maintain a consistent and reliable Decision Table structure that ensures smooth data handling and integration.
Last updated