File Structure of JSON Format
Was this helpful?
Was this helpful?
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.
name
: name of the decision table;
type
: always "decision-table"
for decision tables;
status
: the current ("published
" or "pending
");
inputSchema
: describes the of the decision table. Each variable should be defined as an object, which can hold different attributes or substructures;
outputSchema
: describes the expected from the decision table
decisionTable
: contains the rule itself:
columns
: defines the 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
: 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 (true) or not;
description
: a textual description of the decision table;
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;
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);
active
: defines whether audit logging is active;
debug
: contains a nested attribute active
, which controls whether debug logging is enabled;
ttl
: time to live (in days) for the audit logs (optional, with a default of 14 days).
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.
ruleAlias
: an . If this is left as an empty string, the system will generate one automatically upon import;
tags
: an array containing for categorizing the rule. It may be an empty array;
auditLog
: specifies the configuration;