Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 15 Rules and Rule Functions : Overview of Rules and Rule Functions

Overview of Rules and Rule Functions
This chapter explains how to work with the rule editor to create rules and rule functions. It also explains some specific uses for rule functions.
To learn how rules are executed at runtime and for other background information see TIBCO BusinessEvents Architect’s Guide, especially the section Understanding Conflict Resolution and Run to Completion Cycles.
See Also
Chapter 4, Rules and Functions in TIBCO BusinessEvents Architect’s Guide
Chapter 24, Diagrams for information on using rule dependency and sequence diagrams.
Form-based and Source Rule Editors
When you work with rules and rule functions, you can choose how to work:
You can switch between editors and changes made in one editor are reflected in the other one. You can’t switch from the source editor to the form editor if there are validation errors in the code.
Rule Components
A TIBCO BusinessEvents rule has three components:
Declaration — Use the declaration to declare which concepts and events the rule will depend on, and the names by which instances of these entities can be referred to in the conditions and actions. Aliases must be valid identifiers. Declaring multiple terms of the same type allows the rule to consider multiple instances of the corresponding Entity.
Conditions — Each statement in the condition must evaluate to a boolean value. All of these statements must be true for the rule’s action to be executed. Assignments and calls to certain functions are disallowed in the condition.
Actions — List of statements that will be executed, when the rule is fired, for each combination of terms that matches all the conditions.
Effect of Cache Only Cache Mode
When using Cache Only cache mode for one or more entities, you must consider how to handle the cache-only entities when you write rules and preprocessor rule functions. See Working With Cache Modes and Loading Cache Only Objects into the Rete Network in TIBCO BusinessEvents Architect’s Guide.

Copyright © TIBCO Software Inc. All Rights Reserved