Immutable, ID-based editing operations for normalized decision tables.
Operations that add, remove, or move clauses update every rule at the same position so table arity remains structurally valid.
Summary
Functions
Adds an input clause and inserts :entry_text into every existing rule.
Adds an output clause and inserts :entry_text into every existing rule.
Adds a structurally complete rule at :position or at the end.
Moves an input clause and the corresponding entry in every rule.
Moves an output clause and the corresponding entry in every rule.
Moves a rule to a zero-based position.
Replaces one input entry, locating the decision, rule, and input by stable ID.
Replaces one output entry, locating the decision, rule, and output by stable ID.
Removes an input clause and its corresponding entry from every rule.
Removes an output clause and its corresponding entry from every rule.
Removes a rule by stable ID.
Changes the hit policy and validates any COLLECT aggregation.
Replaces an input clause with the same stable ID.
Replaces an output clause with the same stable ID.
Replaces an existing rule with the same stable ID after checking its arity.
Types
@type result() :: {:ok, Boxic.DMN.Model.t()} | {:error, Boxic.DMN.AuthoringError.t()}
Functions
@spec add_input( Boxic.DMN.Model.t(), String.t(), Boxic.DMN.Model.InputClause.t(), keyword() ) :: result()
Adds an input clause and inserts :entry_text into every existing rule.
The clause is appended unless a zero-based :position is supplied.
@spec add_output( Boxic.DMN.Model.t(), String.t(), Boxic.DMN.Model.OutputClause.t(), keyword() ) :: result()
Adds an output clause and inserts :entry_text into every existing rule.
The clause is appended unless a zero-based :position is supplied.
@spec add_rule( Boxic.DMN.Model.t(), String.t(), Boxic.DMN.Model.DecisionRule.t(), keyword() ) :: result()
Adds a structurally complete rule at :position or at the end.
@spec move_input(Boxic.DMN.Model.t(), String.t(), String.t(), non_neg_integer()) :: result()
Moves an input clause and the corresponding entry in every rule.
@spec move_output(Boxic.DMN.Model.t(), String.t(), String.t(), non_neg_integer()) :: result()
Moves an output clause and the corresponding entry in every rule.
@spec move_rule(Boxic.DMN.Model.t(), String.t(), String.t(), non_neg_integer()) :: result()
Moves a rule to a zero-based position.
@spec put_input_entry( Boxic.DMN.Model.t(), keyword() ) :: result()
Replaces one input entry, locating the decision, rule, and input by stable ID.
@spec put_output_entry( Boxic.DMN.Model.t(), keyword() ) :: result()
Replaces one output entry, locating the decision, rule, and output by stable ID.
@spec remove_input(Boxic.DMN.Model.t(), String.t(), String.t()) :: result()
Removes an input clause and its corresponding entry from every rule.
@spec remove_output(Boxic.DMN.Model.t(), String.t(), String.t()) :: result()
Removes an output clause and its corresponding entry from every rule.
@spec remove_rule(Boxic.DMN.Model.t(), String.t(), String.t()) :: result()
Removes a rule by stable ID.
@spec set_hit_policy(Boxic.DMN.Model.t(), String.t(), String.t(), String.t() | nil) :: result()
Changes the hit policy and validates any COLLECT aggregation.
@spec update_input(Boxic.DMN.Model.t(), String.t(), Boxic.DMN.Model.InputClause.t()) :: result()
Replaces an input clause with the same stable ID.
@spec update_output(Boxic.DMN.Model.t(), String.t(), Boxic.DMN.Model.OutputClause.t()) :: result()
Replaces an output clause with the same stable ID.
@spec update_rule(Boxic.DMN.Model.t(), String.t(), Boxic.DMN.Model.DecisionRule.t()) :: result()
Replaces an existing rule with the same stable ID after checking its arity.