Just a quick question on writing a rule where it just requires one or the
other templates to match. Below is a rule which I want to update the type
of a cow from "Calve" to "Breeding" if there is another cow (calve) with
either its dam_id as the mothers cattle_id OR its surrogate_id as the
mothers cattle_id but unsure of how to implement the either/or part. I saw
another thread using $? but I don't use multishots anywhere in my
"farming-cattle" template. Thanks.
----------------------------------------------
(defrule update-type
(farming-cattle (cattle_id ?mother)(sex "F")(type "Calve"))
(farming-cattle (cattle_id ?child)(type "Calve")(dam_id ?mother))
(farming-cattle (cattle_id ?child)(type "Calve")(surrogate_id ?mother))
=>
(?statement executeUpdate (str-cat "UPDATE " ?*username* "_cattle SET
type = 'Breeding' WHERE cattle_id = '" ?mother "';")))
--------------------------------------------------------------------
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]
--------------------------------------------------------------------