Fork me on GitHub
Eduardo Mata19:01:29

I am applying a basic rule saying

(defrule missing-information
[?event <- Event (nil? flower-id) (= ?id _id)]
(insert! ->AddError _id  :error "Missing Flower _id"))

Eduardo Mata19:01:10

for some reason, I have a Record with flower-id and it clara still telling me the flower-id is missing


@contact904 do you have more than one Event? Are you saying an Event with a non-nil flower-id and a unique _id is being matched with the above rule which insets the AddError fact? Your ->AddError syntax seems incorrect since it isn’t calling the fn to but guessing that this is maybe pseudo-code

Eduardo Mata20:01:35

AddError is a new Record with fields _id, error, value it is close to a pseudo-code

Eduardo Mata20:01:04

I am confused because I have been usings this rule for a long time, this is the first time I get this error

Eduardo Mata20:01:56

I see what is my problem. I have similar _id;s


@contact904 (insert! ->AddError _id :error "Missing Flower _id") is missing parens was my comment on syntax (insert! (->AddError _id :error "Missing Flower _id"))