Decision Table Factor Out Complex Expressions - Gnorion/BizVR GitHub Wiki
Decision Table Factor Out Complex Expressions
While putting that expression (mean(filter(list_of_scores))) as a condition in the table works just fine it will have an impact on performance. Its probably going to be reevaluated for each rule (unless the Aion code gen does some clever optimization)
When modeled as separate table we only compute the intermediate variables (like average) once (which is basically what any optimisation will need to do)
Both models would execute just fine - but maybe we need to have VV suggest to the user that a decision table that uses expressions in its rule condition may not be the most efficient - the more rules that reevaluate that same condition, the more it will affect performance. The recommendation should be to only use single variable names as the condition. And create a separate table to determine the value of that variable so it can be used in multiple places.