Forms of the Regulate rule
There are two basic forms of the Regulate rule, and they are as follows:
- In Form 1, the rule releases an event from the Hold queue when a specific number of events (#Events1) occur during the specified time window (TimeFrame1). The event sent from the Hold queue can be specified by a a literal string in the rule or by one of these parameters:
- $FIRST sends the first event that was received in the time window.
- $LAST sends the last event that was received in the time window.
- $HISEV sends the event with the highest severity.
- $LOSEV sends the event with the lowest severity.
The repeat_count slot of the forwarded event is set to the number of events in the Hold queue.
- In Form 2, when the Hold condition is met, a new event is generated with the rule defining its class type and its initial slot values.
In this form, an instance of a custom event can be sent. Of course, a valid BAROC class definition for the custom event must exist in the Knowledge Base. The send portion is much the same as a BAROC instance for the event, except that the right-hand side of the equal sign can contain expressions.
In both forms, the Unless clause resets the time window. The time windows for the Hold and Unless clauses are sliding windows. After the Hold or Unless clause executes, all events in the window are dropped from consideration and the beginning point of the time window moves to the next event received for consideration. The time frame is specified in seconds, minutes, hours, or days.