do you have an idea / plan for supporting a the “default output value” concept of DMN?
In the DMN spec, chapter 10.3.4.6, page 137, it’s written:
A decision table may have no rule hit for a set of input values. In this case, the result is given by the default output value,
or null if no default output value is specified. A complete decision table SHALL NOT specify a default output value.
I’m not sure how to this would/should be visualized? Would a single “empty” rule row be sufficient? But that would be conflicting / confusing to differentiate with an empty string input column.
Maybe I’ll add a simple example usecase
A decisiontable to determine set some pricing rules dependant on your country
If the customer’s country is Belgium -> 20% discount (-> price *0.8)
If the customer’s country is Netherlands -> 20% more expensive (-> price * 1.2)
For all other countries: original price ( price * 1)
Suppose you would want to implement this, without being forced to input all country codes in the world, and with your business table to be resilient to , for example, Catalunia becoming a new country and messing up our decision table.
Examples purely fictional obviously
You’re right. The spec supports this by marking a value in the list of allowed output values by default. We current don’t have this implemented but it will put it in the roadmap for the next release.
We are also contemplating on support a default value for output clauses that don’t have a list of allowed output values.
In the meantime; for single hit policies; you can indeed replicate this behaviour but adding a rule that will always hit. F.e. by using the dash symbol (-) for the input entries.