Changing a restrictive constraint into a warning constraint

Previous Next

You can change a restrictive constraint into a warning constraint or even into a constraint that gives an informative message only.

Example

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:    Travel Agency Message

Name:        UNSTABLE_DESTINATION

Message:     This destination is currently considered an unstable region.

Parameter:   Destination

Seqno:       1

 

3.Define a constraint:

Name:        WARNING_UNSTABLE_DESTINATION

 

SQL Statement:

INVOKE    RulesEngine.MessageLanguage
WITH
SELECT    'Travel Agency Message'
,         'UNSTABLE_DESTINATION'
,         'WARNING'
FROM      tour t
WHERE     t.destination IN 

( 

     SELECT     u.destination

     FROM       unstable_destination u

)

 

To product an informative message instead of a warning message, specify 'INFORMATION' instead of 'WARNING'.
Do not specify a constraint message: the component takes care of the message.

 

See also

Constraint messages