Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reference to the business object from businessrule objec
Message
From
03/03/2004 12:11:45
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
 
 
To
03/03/2004 03:31:54
Filip Bruman
Kirschberg Holding
Copenhagen, Denmark
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00882006
Message ID:
00882770
Views:
18
Filip,

Maybe I'm misunderstanding, but I thought you were looking for a way, from inside the rules object, to access the related business object?

If so, HostObject stores a reference to the object that instantiated the mmBusinessRule object (look at mmBusinessRule's constructor). This object implements the ImmBusinessRuleHost interface, and is of either mmBusinessObject or mmBusinessEvent type.

In your case, when your business object instantiates its rules object, it can then access the HostObject field to get a reference to the business object:
//This code would be in your rules class.
YourBizObj YBO = this.HostObject;

//You should have intellisense now...
YBO.YourCustomMethod();
Hope that clears the issue up a little,
---J

>Hello J,
>
>Could you please elaborate on what to do with the mmBusinessRules' HostObject?
>The GetBusinessRuleObject method returns a reference to the _BusinessRuleObject_ not the BusinessRules' related BusinessObject, as the return type of GetBusinessRuleObject method is mmBusinessRule or have I understood this all wrong?
>
>Regards
>
>-Filip
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform