| Reference > Rule Languages > Business Action Language > BAL Constructs > then |
then |
PREVIOUS NEXT |
Introduces the part of the rule in which actions are executed if the if part of a rule has been satisfied.
then
<action>;*
The then part of a rule lists one or more actions to be executed if the conditions in the if part of the rule are satisfied.
Every rule must have a then part. If a rule does not have an if part, the actions in the then part of the rule are always executed whenever the rule is fired.
The actions in the then part of a rule are executed in the order they appear. Start each action statement on a new line and end each action statement with a semi-colon (;).
The following example shows how to test the age of a customer in a condition, then execute an action if this test is true.
if the age of the customer is less than 18 then apply 10% discount to the shopping cart of the customer;
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |