I agree with Stephen, if you need an action (e.g. logging) when a constraint
is violated, you are actually defining rules to handle the "negative" cases.
Drools verifier will not help you here, since knowing whether a fact
satisfied a constraint or not is a runtime problem and depends on the
combination of data and rules, whereas verifier looks at rules alone.
Could you please provide more details about your specific requirement? Do
you just need to know when a condition fails? Or do you need a full
analysis? I think we already discussed it: if you have a pattern with a
number of conditions, the engine will stop evaluating a fact as soon as the
first violation is encountered. Like in java, "&&" evaluation is
terminated
eagerly. (In this case, the "not" CE would help).
Also consider this remark: when a constraint such as "field == value" is not
satisfied, the engine *silently* stops propagating the fact along that
branch of the RETE. So, there is no way to be notified of the failure of a
constraint.
The WorkingMemoryListener and the AgendaListener will report only events
with a coarser granularity, so they won't help you.
If you really really really ... really need it, you will have to tweak the
engine. I could show you a few possible ways to do that, but I'm a bit
reluctant...
--
View this message in context:
http://drools.46999.n3.nabble.com/modify-and-update-is-not-working-in-the...
Sent from the Drools: User forum mailing list archive at
Nabble.com.