![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
The rule nesting level in relation to the current rule. For example, the rule that calls $RULENAME is at level 0. In other words, if RuleA calls RuleB and RuleB calls $RULENAME, then, in RuleB, to learn the name of the rule that called $RULENAME (RuleB), use a level value of 0; and to learn the name of the rule that called RuleB (RuleA), use a level value of 1 because it is 1 level higher than RuleB. A value of -1 indicates the maximum value. The transaction nesting level in relation to the current transaction. For example, the transaction that contains the rule that calls $RULENAME is at transaction level 0, for the purposes of this tool. In other words, if RuleA of TransactionA starts TransactionB and RuleB of TransactionB calls $RULENAME, then, in RuleB, to learn the name of the rule that called $RULENAME (RuleB), use a transaction value of 0; and to learn the name of the rule that started TransactionB (RuleA), use a transaction value of 1 because it is 1 level higher than TransactionB. A value of -1 indicates the maximum value.$RULENAME first locates the transaction level specified by transactioncount and then locates the rule specified by level.
In our example below, a transactioncount of 2 with a level of 2 would signal a RANGERROR exception because there are not two rules in the transaction two up from the one where $RULENAME is called.
$RULENAME(0,0) returns the name of the rule invoking $RULENAME.$RULENAME(1,0) returns the name of the rule calling the rule invoking $RULENAME. If this is issued in the first rule in a trigger, it returns the name of the rule causing the trigger to be entered.$RULENAME(-1,0) returns the name of the top rule at the current transaction level.$RULENAME(-1,1) returns the top rule at the previous transaction level.$RULENAME(1,1) returns the first rule up the call stack for the previous transaction.$RULENAME(-1,-1) returns the name of the top rule at the top transaction level.
TIBCO Object Service Broker Programming in Rules for information about transaction processing. (Levels as used in TIBCO Object Service Broker Programming in Rules are different from the use of the levels argument for this tool.)
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |