Posts
76
Comments
229
Trackbacks
7
Business Rules and Data validation

We're just beginning to implement iLog Rules for .Net at work.  A common debate is whether we should use a rules engine for validating data.  Certainly, one can use a rules engine for validating data but it seems like a misuse of the technology.

In my mind, a business rule is a policy that governs a business action.  The data should already be valid before invoking the business rule/policy.  Of course, the business rule/policy must handle invalid data, ergo the ambiguity between data validation and business policy.

For example, let's say you have a business policy that determines an action based on a range of values.  The total range is between 0 and 100.

0 to 50 approved - 51 to 100 denied. 

What if the data is less than 0 or greater than 100?  Do you place a UI/Data validation rule allowing only 0 to 100? Or, do you throw an exception if no decision is returned from the rule engine?  I believe in this case, you validate that the data is numeric, let the business policy determine the action or throw an exception.  Taking this approach allows you to be flexible to changing business policy; separate rules from the code and places the responsibility on the business to determine the correct action.

posted on Saturday, May 12, 2007 2:03 AM Print
Comments
Gravatar
# re: Business Rules and Data validation
dbottjer
5/12/2007 3:03 AM
  
iLog Rules for .NET requires the creation of a Business Object Model (BOM) which seems like a newer term for a Domain Model. I like the idea of adding validation to the Domain Model and adding validation errors to an errors collection. This approach is view independant. A rules engine such as iLog would then be free to apply business rules to clean data.
Gravatar
# re: Business Rules and Data validation
craps tables
1/9/2012 8:00 AM
  
It seems like an information was very understanding to us.
Gravatar
# re: Business Rules and Data validation
martinez vs macklin tickets
1/23/2012 9:42 PM
  
Good connivance of data validation and business policy. Great job.
Gravatar
# re: Business Rules and Data validation
maryluo
1/31/2012 11:15 PM
  
Great information I found here. Thanks for it! orange county seo company | welding schools texas

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 4 and 4 and type the answer here: