Reference > Rule Languages > Business Action Language > BAL Constructs > then

Summary

Introduces the part of the rule in which actions are executed if the if part of a rule has been satisfied.

Syntax

then
     <action>;*

Description

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 (;).

Example

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;

Related Concepts

Rule Actions

Related Tasks

Creating Business Rules

Related Reference

else
for each <object> in <list>
set <variable> to <value>

Related Samples and Tutorials

Tutorial: Creating Business Rules