I am working on a project that does not use Java Bean design pattern for
the Ontology representation.
The mapping of classes and instances is handled separately by java code.
Likewise any changes
to attribute values on the server are mapped to jess and jess generated
events are mapped back to the
server. When I try to do something like this:
(deftemplate A (slot name) (slot y))
(deftemplate B (slot name) (slot x))
(defrule create-fact-rule
?a <- (A (name "a") (y 4))
(not (B (name "b") (x 6)))
=>
(assert (B (name "b") (x 6)))
)
(defrule modify-fact-rule
?a <- (A (name "a") (y 5))
?b <- (B (name "b") (x 6))
=>
(modify ?b (x 4))
)
(defrule delete-fact-rule
?a <- (A (name "a") (y 3))
?b <- (B (name "b"))
=>
(retract ?b)
)
works fine in jess stand-alone mode. But doing something similar in
an integrated mode is resulting in two facts for b with same fact-id's.
The problem arising from this is when delete-fact-rule is fired, only
one of the facts for b is retracted leaving one behind.
This prevent's create-fact-rule from firing again. This seems to happen
only the first time
the fact b is modified.
Each further modification does not create extra facts with same fact-id.
Any insight as to what may be causing this greatly appreciated.
Thanks,
Lakshmi Vempati
begin:vcard
n:Vempati;Lakshmi
tel;fax:(805) 541 1221
tel;work:CDM Technologies Inc
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
x-mozilla-cpt:;0
fn:Lakshmi Vempati
end:vcard