Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : $SIGNAL

$SIGNAL
Raises the specified exception. (C)
Invocation
CALL $SIGNAL(exception,tablename)
 
The name of the exception to be signalled. Its syntax is C (fixed-length character string) with length 16.
The name of a table associated with the exception. If no table is to be associated with the exception, specify an empty string(‘‘). Its syntax is C with length 16.
Usage Notes
See Also
TIBCO Object Service Broker Programming in Rules for more information about exception handling and about the Signal statement.
Example
The following rule demonstrates the use of $SIGNAL to signal a user-defined exception read from a table. It also shows how to simulate a GETFAIL condition on a table without actually issuing the GET. It is assumed that exception handlers for the user-defined exceptions are specified in higher-level rules.

 
PROCESS(VALUE);
-----------------------------------------------------------------------------------
VALUE > 1000; | Y N
-------------------------------------------------------------------------+----
_ CALL $SIGNAL('GETFAIL','KEYVALUES'); | 1
_ GET KEYVALUES WHERE KEY = VALUE; | 1
_ CALL $SIGNAL(KEYVALUES.EXCEPTION, ''); | 2
-------------------------------------------------------------------------+----
_ ON GETFAIL KEYVALUES:
_ CALL ENDMSG('Key value ' || VALUE || ' not found.');

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved