I need a rules based system
Posted on 2006-05-27
I am wrestling with how to create a system with a multitude of user options which can be turned on or off by the user and have various type of values associated with different rules, each value having potentially different meaning as it relates to a different option. I imagine providing the user with a list of rules, each with an associated checkbox to turn the rule on or off. Then when checked, various other controls become active and which allow the user to set specific parameters associated with a certain rule.
Then I need to find a way to incorporate the rule into the code which will turn on, off, or regulate, the rule. I'd like to find a standard way to handle this kind of user interface on the back end. In other words, I'm satisfied that I can easily make the user interface with a list of user based rules, and the associated paramters. The hard part is to find a way to structure a rules object so that it interacts with the code doing the work, on the back end.
Has anybody got any ideas how I could design the rule object(s) and their interactin with the code which will be selectively turned on, and off? I'd like there to be some kind of standard obviously, and I'm at a lot for ideas how to do this.
I expect to create a Rules table, which will be read in upon startup, but don't yet know what columns to create in the Rules table. There would need to be as much information stored in the Rules table so that 100% of the Rules objects can be instantiated at start-up.
Thanks for any help,