Reference > Rule Languages > Business Action Language > BAL Constructs > all of the following conditions are true

Summary

Groups together a series of conditions such that the combined statement evaluates to true only if all the listed conditions evaluates to true.

Syntax

all of the following conditions are true:
    - <condition>* [,]

Description

The all of the following conditions are true provides a more compact and convenient alternative to the logical operator and when you want to combine multiple conditions. The resulting statement is considered true only if each of the listed conditions is true.

This is equivalent to writing if <condition 1> and <condition 2> and ... <condition n>. However, if you have a large number of conditions, using the all of the following conditions are true construct can make the rule more readable.

The construct must be followed by a colon and one or more condition statements, each one on a separate line and preceded by a dash. Note that the dash that precedes each condition must be a `short dash'.

Optionally, you can add a comma after the last condition statement in the list to signify the end of the list of grouped conditions. This will separate those conditions that form part of the construct from any additional condition statements that might follow.

Example

The following group of conditions tests that a customer is Gold junior member.

if 
   all the following conditions are true:
      - the category of the customer is Gold
      - the age of the customer is at most 15
then...

Related Concepts

Groups of Condition Statements

Related Tasks

Creating Business Rules

Related Reference

if
any of the following conditions is true
none of the following conditions are true

Related Samples and Tutorials

Tutorial: Creating Business Rules