| ILOG Rules for .NET User Guides > ILOG Rule Team Server for SharePoint > Structure of Business Rules > Actions |
Actions |
PREVIOUS NEXT |
The action part of a rule describes what to do when the conditions of the rule are met, and in some cases what to do if the conditions are not met. Actions are represented in the Rule Editor by whatever appears after Then and Else.
For example, in the following rule, a discount of 15% is applied when the value of the shopping cart is more than $100.
If the value of the shopping cart is more than $100 Then apply a 15% discount on the shopping cart
| Note |
| Though the definition and condition parts of a rule can be empty, this is not the case for the action part, where at least one action must be specified. |
If there are more than 1 action to perform, they are carried out in the order in which they appear in the action part.
The Else part of a rule is an optional block of actions that specify what to do when the conditions are not met. For example, in the following rule, a 15% discount is applied when the conditions are met, and a 5% discount is applied when the conditions are not met.
If all of the following conditions are true: the value of the shopping cart of this customer is more than $100 the category of the customer is Gold Then apply a 15% discount on the shopping cart Else apply a 5% discount on the shopping cart
In other words, if the value of the shopping cart is not more than $100 or if the customer category is not Gold, the customer will still receive a 5% discount.
It is also possible to refine the use of the Else part of a rule by setting variables in the Definitions part. This is explained in section Use Definitions with the Else Part.
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |