Hi All,
I have a Jess rule program which among other rules contains
"task-completion"
and  "deactivate-task" rules (rule definitions are included below). When I
run my
rule program Jess throws the following exception:

   Rete Exception in routine NodeNot2::RunTestsVeryLeft while execution rule
LHS: ...
   ...while executing defrule task-completion.
  Message: Corrupted Negcnt (< 0) at line ...

Now, if I comment out the "deactivate-task" rule, the "task-completion" rule
will be executed without any problem.

I would appreciate any hints about this problem.

Thanks,
Dariush Navabi

Rule Definitions:
;; compound task completion/removal
(defrule task-completion
 (declare (salience -1)) 
 ?t <- (task (taskName ?theTask))
 ;?at <- (activeTask (taskName ?theTask))
 (hasSubTask (taskName ?theTask) (subTaskName ?theSubTask)) 
 (not (task (parentTask ?theTask)))
=>
 (printout t "Removing " ?theTask " from the agenda" crlf)
 ;(retract ?t ?at)
 (retract ?t)
)

;; compound task deactivation
;; 
(defrule deactivate-task
 (declare (salience 1)) 
?at <- (activeTask (taskName ?theTask))
 (not (task (taskName ?theTask)))
=>
 (printout t "Deactivating" ?theTask  crlf)
 (retract ?at)
)
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to