Hi folks, I am having some troubles coming up with a design for the following problem. I have a Product object that have a several properties (e.g. category (a string), dangerous (a boolean), type (enum), length(int), height(int), weight(int) etc.) There is a set of rule that allows to set the value of some properties based on conditions on other properties. For example : Set the
Type
Type
property to "Big" when
Length
Length
>2 and
Weight
Weight
>15. Another example : "Set the
Dangerous
Dangerous
to
true
true
when
Category
Category
==
fireworks
fireworks
. Those rule must not be harcoded in the code, because our users want to have the possibility to add such rules on their own. Does anyone have an idea on how to do this ? Some of my pain point are : - How to model a rule in a nosql database ? - How to apply it seamlessly on the Product objects etc.