The return Keyword

The return keyword instructs the rule engine to discontinue processing subsequent rules in a ruleset if the conditions in the rule containing the return keyword have been met. The return keyword is particularly useful in a ruleset for which expedient processing of a transaction through multiple rules is desired.

The return keyword is available only in Free Form Editing or in the Free Form Expression text box within Structured Editing. It is always used in the action, or “then”, block of a rule and may or may not be used with other actions. A semicolon must follow the return keyword.

The following example illustrates the use of a return statement used with a LookupList function. In this example, assume that there are six rules in the Credit Decision Ruleset. The first rule has a condition that excludes cards found on the VIP_CARDHOLDERS hotlist, and this condition is followed by a return keyword:

if LookupList(“VIP_CARDHOLDERS”,CRTRAN25.pan) = 1
then
{ return; }

If the condition is met, meaning that the incoming transaction’s account number is on the VIP list, the transaction does not evaluate against rules two through five.

The return keyword is also useful if you have a long list of decision rules. Falcon does not stop processing subsequent rules in a ruleset when a rule “fires” unless the rule that fires ends with a return keyword. Otherwise, all rules in the ruleset are evaluated by every transaction. When there are complex rules that use large lookup lists, you may be able to expedite processing, increasing transactions per second (TPS), by using the return keyword in the rules.

In the following figure, five rules use the return statement.


Rules in a Ruleset

The VIP_rule uses a return that results in VIP cardholders being excluded from the rest of the rules. The RiskyActivity, USA_Swiped, RiskyChgOfAddress and Pogo_Test_TXN rules occur above the SuspectThreshold rule. If a transaction triggers one of these rules, that rule will “fire” causing the actions to be initiated. The return statement in each one ensures that only one rule will fire. If none of the other rules fire, the SuspectThreshold rule acts as a “catch all” that fires on any transactions that score above a specific number.

  • www.fico.com