I have some rules for validating data, e.g.
(defrule warn-if-no-name
?taxon <- (taxon (name nil))
=>
(assert (warning (message "No name set") (resource ?taxon))))
Now, if a value is set for the 'name' slot, the 'warning' should be
retracted. Is there any way to accomplish this with a single rule, or do
I have to duplicate and negate the complete rule?
(defrule remove-warning-if-name
?taxon <- (taxon (name ~nil))
?fact <- (warning (message "No name set") (resource ?taxon))
=>
(retract ?fact))
It's quite possible that my approach to the problem is flawed,
neverthless I hope you can see what I am trying to do here.
--
Eric Jain
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------