then

This mandatory construct introduces the part of the rule that defines the actions that are executed if the if part of a rule is satisfied.

Purpose

You use this construct to introduce one or more actions to be executed if the conditions of the rule are met.

Syntax

then
     <action>;*

Description

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 executed.

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;