EventStreamView
From RuleCore Support
Without an event stream view, every rule instance would see every inbound event.
Normally, this is not what you want. The view provides a dynamic window into the stream of inbound events for each rule instance. The situation detection of the rule instance is normally evaluated with this view as its context.
Typically only events which are somehow related to the same real world entity, or entities, are of interest in the situation detection processes in each rule instance. Events could be semantically related in different ways, depending on what kind of situation you are interested in detecting. Events could for example be related by carrying information in their event body about the same person, building, server, customer or activity.
- For example - If you would like to detect a situation with excessive error rates per server, you a need a way to process events from the same server while evaluating a rule instance. A view is used to create this grouping. Another grouping would be to process events from servers located in the same data centre location. You could think of the view as the way to detect situations per something. Per server, per person, per data centre, per location or any other grouping you like.
The main purpose of the event stream view is:
- Group events into meaningful sets, providing context for situation evaluation.
- Provide each rule instance with an unique set of events
Events could be semantically related in different ways depending on your specific application. For example, containing information in their event body about the same person, building, server, process, customer or activity.
Characteristics
- Declarative - States properties of events which must be true for inclusion in the view.
- Each rule instance attaches to its own view instance.
- Views are automatically updated as inbound events enter the ruleCore CEP Server.
- Situations and actions are evaluated in the context of the view.
Types of View Properties
- Age – Include only events younger than a specified time period.
- Assert – Assert that an expression is true on the contents of an event.
- Count – Limits the number of events.
- Match – Allow only events with matching content.
- Type – Restrict events to certain types.
- Unique - Enforces property value uniqueness among events.
Usage
View properties are used when defining a view with the AddViewDef system event.
The ViewDef element is used to specify the properties of an event stream view.