General information
Category:
The Mere Mortals Framework
>I have a group of business objects which access a group of similar tables.
>
>All of these objects share some fundamental business rules - for example, no records can be created prior to a certain date.
>
>My initial approach to solving this was to create a subclass of kBizRules, called DEBITRULES, and create a common set of business rules for this class. I would then subclass debitrules for each of the business objects, so I could apply more specific rules to each object.
>
>The issue is I need to access a view to check the common rules. The view is the same for each object. How can I do this without adding the view to each of the business objects which will be using this debitrules subclass? If I do that, then every time I add a new view to check a rule, I'll need to add it to each business rule's data environment.
>
>Or, perhaps there is an alternative way for a bunch of business objects to share common rules (which require lookups in views).
Given a program that works with the US Gov't and its penchant for rewriting rules every year, I'm working on something similar.
I subclassed the kBizRules object, giving it its own aBizRules bizobj. It has views of RuleSet and BizRules to mix, match, and re-use rules where appropriate. Right now, I can switch between having the goApp object create Bizrules to cut down overhead (Private datasessions beware!), or have the aBizRules object instantiate its own when rules are questioned.
Actual rule code can be macro &executed or execscript()ed.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only