Run-time Inferencing Behavior : Runtime Architecture and Flow

Runtime Architecture and Flow
At runtime, one or more nodes (JVMs) running one or more BusinessEvents inference agents process the incoming events using a Rete network as the inferencing engine, and a set of rules that are triggered by conditions in incoming events. One or more event stream processing query agents can query incoming events.
BusinessEvents has two layers of functionality:
Rules Evaluation and Execution  based on the state and value of objects and incoming events. This functionality is achieved using one or more inference agents configured with the appropriate rules. Each inference agent executes rules using one or more Rete networks to optimize performance and provide rule inferencing capabilities.
Lifecycle Management of Objects and Events  including distribution, clustering, persistence and recoverability. Various options are available to achieve the levels of functionality appropriate for business needs, from in-memory only storage of objects, to advanced caching features and a backing store (database). Figure 4 shows cache object management.
In addition, when TIBCO BusinessEvents Event Stream Processing software is used, a third layer is added: queries and pattern matching. A query agent enables visibility into the event stream and cache data. Pattern matching features enable actions to be taken on recognition of a pattern of events, or failure to complete a pattern of events.
Figure 4 TIBCO BusinessEvents Runtime Flow
Rule Evaluation and Execution
Information from enterprise applications and other sources flows into BusinessEvents through channels as messages. Messages represent the events that BusinessEvents processes based on event definitions (event types). Events can be filtered (ignored), preprocessed into concepts or cached concepts, or asserted into the rule engine's working memory.
In an inference agent, all the rules whose conditions match information in the events (as well as concepts, if specified in the rule conditions) are assembled into a rule agenda and the first rule executes. If a rule successfully executes, its rule actions create and modify the objects in working memory. The rule agenda is derived from an internal runtime memory structure known as a Rete network (because it uses a derivative of the Rete algorithm).
BusinessEvents rule engine is a forward-chaining inferencing engine. Every time the facts (concepts, score cards, and events) in its working memory change — due to rule actions or the arrival of new events — the inferencing engine updates the rule agenda. As a result, new rules are available to execute while others are now unavailable. The selection of which rule to execute first from a choice of several is called conflict resolution. The agenda process repeats until there is no more new information to process. This is known as RTC, or run to completion. See Understanding Conflict Resolution and Run to Completion Cycles for more details.
(Note that State Machine, is present only in TIBCO BusinessEvents Data Modeling add-on software).