Order of Evaluation of Rule Conditions
The order in which conditions are evaluated is determined internally by TIBCO BusinessEvents.
Using a rule’s dependency set, TIBCO BusinessEvents evaluates the following kinds of rule conditions in the order shown, to perform the evaluation efficiently:
- A. Filters
- These are onditions that only involve one scope element (object). Filters are the least expensive operations, in terms of processing cost. For example:
Customer.type == "gold"; Customer.numOrders > 50;
- B. Equivalent join conditions
- These are conditions that compare two expressions using
== where each expression involves one (different) object from the scope. Equivalent joins take more processing than filters, but less than non-equivalent joins. For example:
Customer.accountMgr == AccountManager.id;
- C. Non-equivalent join conditions
- These are conditions involving two or more scope elements other than equivalent joins. These are done last because they are the most expensive in terms of processing cost. For example:
Customer.numOrders < AccountManager.threshold; MyFunctions.match(Customer, AccountManager);
Tip:
- If a rule uses multiple equivalent joins, a warning is printed to the engine log file. The purpose of the warning is to draw your attention to the situation so you can ensure that the order of the joins results in the most efficient processing.
- To optimize performance, do as much filtering as possible, to reduce the number of times TIBCO BusinessEvents evaluates a join condition.
- When using static variables, it is preferable to use Global Variables rather than scorecards for optimum performance. Scorecards are special types of concepts, which will create join conditions like any other concepts as opposed to Global Variables. Global Variales are a part of filter conditions, thus they yield greater performance.
Copyright © TIBCO Software Inc. All rights reserved.