I'm adding support for "otherwise" to (for the time being) the guided
decision table in Guvnor.
The idea being if you set a cell to represent "otherwise" the generated rule
is the opposite of the accumulation of the other cells; perhaps best
explained with an example:-
Person( name == )
This would generate:-
Person(name not in ("Mark", "Kris", "Geoffrey")
Equals is the simple example, this is my thoughts for the other operators we
might like to support:-
- != becomes "in (<list of the other cells' values)"
- < becomes ">= the maximum value of the other cells' values
Person ( age < )
Person ( age >= 30 )
- <= becomes "> the maximum value of the other cells' values
- > becomes "<= the minimum value of the other cells' values
- >= becomes "< the minimum value of the other cells' values
- "in" becomes "not in (<a list of all values contained in all the
cells' lists of values>)"
Person ( name in )
Lisa, Jane, Paul
Person ( name not in ("Jim", "Jack", "Lisa",
"Jane", "Paul" ) )
- I'm not sure there is a simple solution for "matches" and
but welcome advice, although a possibility might be to create a compound
Person ( name soundslike )
not Person ( name soundslike "Fred" || soundslike "Phil" )
Would this be considered the most suitable approach?
Inputs and thoughts welcome.