| ILOG Rules for .NET User Guides > ILOG Rule Solutions for Office > Getting started > Understanding the structure of business rules |
Understanding the structure of business rules |
PREVIOUS NEXT |
Business rules express business policy using a formalized vocabulary and a series of if-then statements. They describe, constrain, or control some aspect of your business.
Consider the following business policy:
Customers who spend a lot of money in a single transaction should be upgraded.
To express this business policy using business rules, we must first clarify what we mean by "a lot of money", and what we mean by "upgrade" a customer. We do this by creating a formal business vocabulary that defines the business terms, operators, and values that have a specific meaning within our business application. We use these different vocabulary elements as building blocks to construct our business rules:
In our example, we might determine that "spend a lot of money" actually means "spend more than $1500", and that upgrading a customer actually means changing their status category to "Gold".
Once we have created a formalized vocabulary, we can now express the logic of the above business policy as a simple if-then statement, using the following business rule:
If
the value of the customer's shopping cart is more than $1500
Then
change the customer's category to Gold
This simple example illustrates the basic structure of a business rule:
You can also define actions to perform in case the condition(s) in the if part of a rule are not met. You do this by adding an else part to your rule:
Finally, for more complex rules, you can use variables to help you express rule statements more simply (see Define variables and constants). You define variables for a rule in an optional definitions part:
Together, these four parts form the basic structure of every business rule. A more complete example that includes if, then, else and definitions parts is shown in the following diagram:
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |