- DecisionTable
Represents a decision table. Contains all necessary information
to evaluate a decision table: hit policy, language type, input
parameters, output parameters and rules.
- label : String
An optional label of the decision table.
- hitPolicy : HitPolicy
Hit policy of the decision table.
- language : ExpressionLanguage
Language type used in decision table expressions.
- module : String
An optional module name against which the expressions are validated,
parsed and executed.
- DecisionTable() CONSTRUCTOR
- Constructs an empty decision table.
- DecisionTable(inputs* : List<Parameter>, outputs* : List<Parameter>) CONSTRUCTOR
- Constructs a decision table with given inputs and outputs.
- addInput(input* : Parameter) : void
- Adds a single input at the end of the current decision table inputs. Empty rule entries are added as well.
- addInputAt(index* : Integer, input* : Parameter) : void
- Adds a single input at the specified index position of the current decision table inputs. Empty rule entries are added as well.
- addInputs(inputs* : List<Parameter>) : void
- Adds an list of inputs at the end of the current decision table inputs. Empty rule entries are added as well.
- addOutput(output* : Parameter) : void
- Adds a single output at the end of the current decision table outputs. Empty rule entries are added as well.
- addOutputAt(index* : Integer, output* : Parameter) : void
- Adds a single output at the specified index position of the current decision table outputs. Empty rule entries are added as well.
- addOutputs(outputs* : List<Parameter>) : void
- Adds an list of outputs at the end of the current decision table outputs. Empty rule entries are added as well.
- addRules(rules* : Rule...) : void
- Adds rules.
- evaluate(inputValues* : Map<String, Object>) : List<Map<String, Object>>
- Evaluates this decision table. Input values are given in a map, where keys are input parameter names.
- evaluate(inputValues* : List<Object>) : List<List<Object>>
- Evaluates this decision table. Input values are given in a list in the same order as the input parameters of this decision table.
- getHitPolicy() : HitPolicy
- Returns a decision table hit policy.
- getInputs() : List<Parameter>
- Returns a decision table inputs.
- getLabel() : String
- Returns a decision table label.
- getLanguage() : ExpressionLanguage
- Returns a decision table language.
- getModule() : String
Returns a decision table module. May be null.
When specified, the decision table module is used to validate and parsed the expressions in the decision table.
- getOutputs() : List<Parameter>
- Returns a decision table outputs.
- getRules() : List<Rule>
- Returns a decision table rules.
- initialize() : void
- Initializes the decision table. Implementation of this method does nothing. Subclasses typically override this method.
- load(id : String) : Boolean
- Loads the content of this decision table from a previously stored decision table. Returns true in the case of successful loading and false when there is no saved decision table with the specified identifier.
- removeInputAt(index* : Integer) : void
- Removes an input at the specified index position. Rule entries at the index column are removed as well.
- removeOutputAt(index* : Integer) : void
- Removes an output at the specified index position. Rule entries at the index column are removed as well.
- removeRule(rule* : Rule) : void
- Removes the specified rules.
- save(id : String) : void
- Persistently stores the content of the decision table under the selected identifier.
- setHitPolicy(hitPolicy* : HitPolicy) : void
- Sets the decision table hit policy.
- setLabel(label : String) : void
- Sets the decision table label.
- setLanguage(language* : ExpressionLanguage) : void
- Sets the decision table language.
- setModule(module : String) : void
Sets a decision table module. May be null.
When specified, the decision table module is used to validate and parsed the expressions in the decision table.
- RuleFINAL
Represents a rule (a row) of a decision table.
- description : String
An optional rule description.
- Rule() CONSTRUCTOR
- Creates a rule with no entries.
- Rule(inputEntries : List<Entry>, outputEntries : List<Entry>) CONSTRUCTOR
- Creates a rule with a given list of inputs and outputs.
- getDescription() : String
- Returns a rule description.
- getInputEntries() : List<Entry>
- Returns a list of inputs.
- getOutputEntries() : List<Entry>
- Returns a list of outputs.
- setDescription(description : String) : void
- Sets a rule description.
- EntryFINAL
Represents a single rule entry. An entry contains
either an expression or a selection of allowed values.
- expression : String
An entry expression. It is null if the entry
contains a selection of allowed values.
- Entry() CONSTRUCTOR
- Creates an empty rule entry.
- Entry(allowedValues : Set<AllowedValue>) CONSTRUCTOR
- Creates a rule entry with a selection of allowed values.
- Entry(expression : String) CONSTRUCTOR
- Creates a rule entry with a given expression.
- getAllowedValues() : Set<AllowedValue>
- Returns an allowed value selection.
- getExpression() : String
- Returns a rule entry expression.
- ParameterFINAL
Represents both input and output parameter of the decision table.
- name : String
A name of the parameter. Name of input parameter
is optional (such inputs are called anonymous).
Name of output parameter is required.
- type : String
Type of the parameter. Anonymous parameters should not specify type.
- multiAllowedValues : Boolean
If the parameter specifies allowed values,
this flag specifies whether multi selection
of allowed values in a rule is possible.
- Parameter() CONSTRUCTOR
- Constructor for anonymous inputs.
- Parameter(allowedValues : List<AllowedValue>, multiAllowedValues : Boolean) CONSTRUCTOR
- Constructor for anonymous inputs with allowed values.
- Parameter(name : String, 'type' : Type<Object>) CONSTRUCTOR
- Creates a parameter with a given name and type.
- Parameter(name : String, 'type' : String) CONSTRUCTOR
- Creates a parameter with a given name and type.
- Parameter(name : String, 'type' : Type<Object>, allowedValues : List<AllowedValue>, multiAllowedValues : Boolean) CONSTRUCTOR
- Creates a parameter with a given name, type and allowed values.
- Parameter(name : String, 'type' : String, allowedValues : List<AllowedValue>, multiAllowedValues : Boolean) CONSTRUCTOR
- Creates a parameter with a given name, type and allowed values.
- getAllowedValues() : List<AllowedValue>
- Returns a list of allowed values.
- getName() : String
- Returns a parameter name.
- getType() : String
- Returns a parameter type.
- isMultiAllowedValues() : Boolean
- Returns true if the parameter allows multi-selection of allowed values in the rule entries.
- AllowedValueFINAL
Represents an allowed value.
- expression : String
Expression of the allowed value.
- AllowedValue(expression : String) CONSTRUCTOR
- Creates an allowed value object with a given expression.
- getExpression() : String
- Returns the expression of the allowed value.
- DecisionTableComponent extends FormComponent
Renders decision table in a form and allows decision table editing. The table is read-only by default. User will be able to perform only rights specified using <code>setRights</code> method.
- refresh() : void
- setDecisionTable(dt : DecisionTable) : void
- Set decision table to be edited.
- setRights(rights : dmn::DecisionTableRights...) : void
- Configure user rights for decision table component. The table is read-only by default. User will be able to perform only rights listed here.
- setRights(rights : Collection<dmn::DecisionTableRights>) : void
- Configure user rights for decision table component. The table is read-only by default. User will be able to perform only rights listed here.
- HitPolicy
Enumeration of supported decision table hit policies.
- FIRST
Hit policy that returns the ouput(s) of the first matching rule.
- RULE_ORDER
Hit policy that returns the ouput(s) of all the matching rules in order.
- DecisionTableRights
Enumeration of rights controlling what the user can do with the decision table,
when edited in Web UI.
- CAN_CHANGE_NAME
A right specifying that the user can edit the decision table name.
- CAN_CHANGE_LANGUAGE
- CAN_CHANGE_INPUTS
A right specifying that the user can change the decision table inputs.
- CAN_CHANGE_OUTPUTS
A right specifying that the user can change the decision table outputs.
- CAN_CHANGE_RULES
A right specifying that the user can change the decision table rules.
- CAN_EVERYTHING
A right specifying that the user can change all properties of the decision table.
- ExpressionLanguage
Enumeration of supported languages in decision tables.
- LSPS
LSPS expression language.
- S_FEEL
S-FEEL expression language.