Я хочу express правило, подобное
rule "R"
when
a: A()
c: C(a.timestamp<timestamp)
not(B(a.timestamp<timestamp && timestamp<c.timestamp))
then
// error no B between A and C
end
, но используя DSL
, как я могу express not
?
rule "R"
when
there is an A a
there is a C c
- with timestamp greater than a.timestamp
there is NOT a B
- with id between a.timestamp and b.timestamp
then
// error no B between A and C
end
[condition][]there is an A {a}={a}: A()
[condition][]there is a C {c}={c}: C()
[condition][]there is NOT a B=not(B())
[condition][]- with timestamp greater than {timestamp}=timestamp > {timestamp}
[condition][]- with timestamp between {lower} and {upper}={lower}<timestamp && timestamp<{upper}