occursin
The
occursin keyword defines a unary temporal
constraint in an event condition.
Purpose
This keyword is used in the condition part of rules in an event condition to express a temporal constraint on a single event.
Context
Rule conditions
Syntax
[?var:] event className (?eventVar occursin interval);
Description
Deprecated as of V7.5.
An occursin test
is satisfied if the timestamp of the event is included in the interval.
An interval is of the form [lowerBound, upperBoundL], where a bound is either an expression evaluating to an integer, or the $ sign which denotes infinity.
Example
rule CheckErrorReport {
when {
?u: User();
?a1: not event Check(?this occursin [1, 60]);
} then {
?u.report(?a1);
}
};An instance of the CheckErrorReport rule
is created on each instance of the User class in
the working memory when the timestamp of the Check event ?a1 does
not occur between 1 and 60.