This is the kind of thing you can see in Jess 6 if your definstanced objects, or objects in their slots, have hash code values that change at random times while the objects are in Jess's working memory. I suspect that's what's happening here. Jess 7 has a specific mechanism for handling this -- the set-nonvalue-class function that lets you warn Jess that a class will exhibit this behavior. Such objects are treated specially to avoid the problem seen here.
I think Hasan Khan wrote: > Hello, > > I get the following error when trying to execute the code: > > > > (defrule STATE-CLEANUP::Clean2 "remove all facts generated for a pid" > > (declare (salience -508)) > > ?f1 <- (MAIN::domain-state-req-cleanup(pid ?pid)) > > ?f2 <- (STATE-PROCESSING::valid-action(pid ?pid)) > > => > > (modify ?f2 (object nil)) > > (retract ?f2) > > ) > > The stack trace of the error is: > > > > Caused by: Jess reported an error in routine modify > > while executing (modify ?f2 (object nil)) > > while executing defrule STATE-CLEANUP::Clean2. > > Message: Fact object not in working memory > (STATE-PROCESSING::valid-action (oid 17449694) (pid gen113) (object > <Java-Object:fleetcycle.domain.es.taskCardAssignment.TaskCardGroupAssign > ment>) (action "taskCardAssignment.removeTaskCardGroupAssignment") (name > removeTaskCardGroupAssignment) (allowed TRUE) (parentState nil) > (validationErrors nil)). > > at jess.FactList.modifyRegularFact(FactList.java:306) > > at jess.FactList.modify(FactList.java:242) > > at jess.Rete.modify(Rete.java:492) > > at jess.Modify.call(Modify.java:31) > > at jess.FunctionHolder.call(FunctionHolder.java:31) > > at jess.Funcall.execute(Funcall.java:257) > > at jess.Defrule.fire(Defrule.java:252) > > at jess.Activation.fire(Activation.java:84) > > at jess.Agenda.run(Agenda.java:259) > > at jess.Agenda.run(Agenda.java:235) > > at jess.Rete.run(Rete.java:1360) > > at > fleetcycle.model.framework.rules.RulesProcessCleanup.cleanUp(RulesProces > sCleanup.java:42) > > > > Any help would be really appreciated. > > Thanks > > Hasan > > > > > > Confidentiality Notice: ********************************************** This E-mail and any attachments thereto, are intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this E-mail, you are hereby notified any dissemination, distribution or copying of this E-mail, and any attachments thereto, is strictly prohibited. If you receive this E-mail in error, please immediately notify me by reply E-mail or telephone at (218) 723-7887 and permanently delete the original and any copy of this E-mail, and any printout thereof. --------------------------------------------------------- Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- 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] --------------------------------------------------------------------
