What are business rules
Thursday, July 21st, 2005Long long ago, actually less than a 100 years ago, a car was worth a fortune - 2500 dollars actually. By todays standard that is about 50000 dollars. The most recent lookup i did of a far superior version of a simillar car showed me that it costed less than 20000 dollars. What changed between then and now?
One word- Automation. And ofcourse you find this not just in car manufacture but virtually in every product that is being produced or will be produced. Automation is the essence of life. Nothing in the world can prevent automation - nothing has in the past.
What has automation got to do with Business Rules?
Everything! Today business rules are the heart of automation systems that involve replacing human-to-human processes with software systems. They are the heart of decisioning logic.
We wont go into classic definition of ‘What business rules are?’ (by the way you can find many classical definitions by googling around).
Here is a definition (picked these from answers.com) of a rule(not necessarily a business rule):
“A usual, customary, or generalized course of action or behavior”. In other words a constraint that typically prescribes an action.
So now what is a business rule?
The essence of business rules in simple terms represent decisioning logic and is pertinent to a particular business function. That in one way differentiates a rule from a business rule. This definition is still not complete. For it would include procedures (which in many cases are associated with a business function but are not executable business rules). At this stage this definition would suffice for us, but please understand that identifying business rules is probably the most difficult thing in software development. You can have 2 million java programmers but it is unlikely to have 2 million Business Rules expert. Part of the problem is the ability to differentiate between a rule and a business rule.
Whoa, wait a minute can you give me a simple example of a business rule?
Ok. Do you have a mobile phone? Depending on which country you are from, you would definitely have atleast 2 o
r 3 major mobile phone provider options. For example:
Onto the left are some geographical markets and some providers that have been listed. Most of these are familiar ones.
Go to any of these websites. In all likelihood you would see some ‘campaigns’ running there. Try to purchase a mobile phone plan. You would be greeted with some basic information (that is being used to qualify you as a user) and then you are offered a series of options as a consumer.
Surveying a list of plans from a single provider would give you a table that looks somewhat like whats there on the left.
If you choose any one of the plans, you are constrained and obliged to pay for your usage as per the terms and conditions laid out in the plan. In this case for example if you choose plan 2000 you would pay 25 cents for every additional minute over the 2000 minutes. At the end of the month (or billing cycle as the case maybe) the provider would send you a statement of charges that lists your usage and a bill that needs to be settled by you. Lets get into the billing system that is actually generating such a bill, undoubtedly the contract between you and the service provider is going to govern the way the statement of charges is going to be calculated. All the constraints that service provider uses to calculate your statement is dictated by this plan’s outline. All such constraints are business rules.
Ready for another example?
Try to get an online quote from a healthcare insurance. In virtually almost all cases you would be asked the question (or a variant) “Are any of your family members tobacco users?”. Some healthcare companies (depending on the answers you give) have higher premiums if you are a tobacco user. Thats an example of a premium calculation business rule which attributes a higher pricing factor based on the risk profile of the applicant. So in effect there is a constraint that is simillar to the following:
if
the applicant is a smoker
then
pricing factor = (pricing factor)*(risk factor for smoker)
Obviously i have simplified and demystified the whole example so that you can get the hang of it. But essentially that is what it is.
In the future pieces we will:
- More examples of business rules
- Different types of business rules.
- Why business rules change and why its a pain in the neck
- How to differentiate a rule from a business rule
Disclaimer:
I am associated with a business rules management system provider-YASU Technologies (QuickRules Business Rules Engine). I will try and avoid specific comparisions amongst products, but you know no matter what prejudices stay.
You can read more about the company and its products at http://www.yasutech.com. There are lots of interesting tools to externalize, manage and align business rules that could be of interest.
“If you are a developer then there is a free 30 day trial download available” - dont blame me for thinking in rules cos i live and breathe by it!