Hi All,
I do have some server side rules and some client side rules for a business object. And when I am hitting the save button I am explicitly calling the checkrules for the business object. The whole system is working just fine. Even when I am changing field with some data in it and going to the next field it is automatically checking the rules for both sync and async rules. And nothing is broken there.
The server side rules are actually async rules. Now what I want is if any of the client side rules (that is non async rules) fails I don't want to call the server side rules during the object saving process. Can anyone let me know if this feature is already available in CSLA 4.0.1 or do i have to write something for it. Also just an added note I am using Silverlight 4.
Hope I was been clear about my issue. Awaiting your reply.
Regards
Tiklu.
This feature is readily available.
Use Priority on you rules:
Set sync rules to have Priority = 0 (this is the default value so you may not need to change anything)
Set async rules to Priority = 1
That should do it.
Explanation:
The BusinessRules have a property : ProcessThroughPriority - default value is 0.
All rules with lower or equal priority are processed even if a rule is already broken and and the broken rule does not explicitly shorctut RuleEngine (StopProcessing = true).
Hi Jonny,
Thank you for the reply. This is what I wanted to know
- Tiklu
Copyright (c) Marimer LLC