Here is the rule which compiles fine :
(defrule MessageCountUnreadUpdate
(MessageItem (reference ?r) (context ?c) (author ?a) (status
"unread"))
?f1 <- (MessageCount (context ?c)
(author ?a)
(unread ?u)
(messages $?m)
)
(test (not (or (member$ ?r $?m))))
(ContextItem (context ?c))
(not (ContextItem (context ?c2&:(> ?c2 ?c))))
=>
(modify ?f1 (unread (+ 1 ?u))
(messages (insert$ $?m (+ 1 (length$ $?m)) (create$ ?r)))
)
)
Here is the execution trace :
FIRE MessageCountUnreadUpdate f-28, f-27,, f-14
Rete Exception in routine NodeNot2::RunTestsVaryLeft while executing
rule LHS: [NodeNot2 ntests=2 [Test2Simple:
test=EQ;tokenIdx=0;leftIdx=16;rightIdx=2] [Test2Simple: test=EQ;toke
nIdx=0;leftIdx=7;rightIdx=3] ;usecount = 1] while executing defrule
MessageCountUnreadUpdate.
Message: Corrupted Negcnt (< 0) at line 0: ( run 1 ) .
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at jess.ReteException.<init>(ReteException.java:27)
at jess.NodeNot2.runTestsVaryLeft(Compiled Code)
at jess.NodeNot2.runTestsVaryLeft(Compiled Code)
at jess.NodeNot2.runTestsVaryLeft(Compiled Code)
at jess.NodeNot2.runTestsVaryLeft(Compiled Code)
at jess.Node2.callNode(Compiled Code)
at jess.Node.passAlong(Compiled Code)
at jess.Node1TECT.callNode(Compiled Code)
at jess.Rete.processTokenOneNode(Compiled Code)
at jess.Rete.processToken(Compiled Code)
at jess.Rete._retract(Rete.java:573)
at jess.Rete.retract(Rete.java:558)
at jess.Modify.call(Compiled Code)
at jess.Funcall.simpleExecute(Compiled Code)
at jess.Funcall.execute(Compiled Code)
at jess.Funcall.execute(Compiled Code)
at jess.Defrule.fire(Compiled Code)
at jess.Activation.fire(Activation.java:54)
at jess.Rete.run(Compiled Code)
at jess.HaltEtc.call(Compiled Code)
at jess.Funcall.simpleExecute(Compiled Code)
at jess.Funcall.execute(Compiled Code)
at jess.Funcall.execute(Compiled Code)
at jess.Jesp.parseAndExecuteFuncall(Compiled Code)
at jess.Jesp.parseSexp(Compiled Code)
at jess.Jesp.parse(Compiled Code)
at jess.Rete.executeCommand(Compiled Code)
at InteractionManager.run(Compiled Code)
Any hints ?????
Thanks,
Olivier Causse
---------------------------------------------------------------------
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]
---------------------------------------------------------------------