Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bizrules
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Miscellaneous
Thread ID:
00599033
Message ID:
00599056
Views:
11
Jim,

>A student bizobj has a child object called guardian object. The student bizobj has a rule that if the student is under age 18, there must be at least one guardian. The guardian object has a rule that if the student is under 18, one guardian must be a contract buyer. So you see, two way communication between the bizobjs during rules checking is necessary. Since I have never had to deal with this scenario, I was hoping someone could offer some suggestions.

You could create a method in the Student business object called "IsGuardianPresent()" (or something similar). This method could call a corresponding method on the Guardian object, passing the student id as a parameter. This method can be called from the Student business rule object as follows:

This.oBizObj.IsGuardianPresent()

You could also create a method in the Guardian object called "IsStudentUnder16()". This method could call a corresponding method on the Student object, passing the student id as a parameter. This method can be called from the Guardian business rule object.

In each case, the two methods can either use an existing reference to the Guardian or Student object, or create a new instance as necessary.

Hope this helps!
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform