Warning Constraint Example: Scheduling Tours to Unstable Destinations

Previous Next

The Travel Agency schedules tours to many exotic destinations. Sometimes, a destination is not considered to be stable, politically or economically. It is not recommended then to schedule a tour to this destination. However, it is the participant that decides whether to take the risk.

1.Define a new message categorie, and do not select the System check box:

Category: Constraint Warning

2.Define a new system message:

Code:        1

Category:    Constraint Warning


Message:     (Destination) is currently considered an unstable region.

Parameter:   Destination

Seqno:       1


3.Define a constraint:


SQL Statement:


INVOKE    RulesEngine.MessageLanguage
SELECT    'Constraint Warning'
,         'WARNING'
,         destination
FROM      schedtour
WHERE     destination IN ( 'PAKISTAN','BALI' )

Do not specify a constraint message: the component takes care of the message.


See Also

Warning Constraints