>From this description, I don't see anything wrong. Double-check your
code, and use the (watch) function to see the facts that get created
to make sure they're what you expect.

Maybe the Rulenumrollup class's accountnumber slot is a STRING, and
you're trying to match it with what looks like a number or a symbol?
You might try

 executeCommand("(assert (Rollup-Event clear \"" +
                accnum.toString() +
                "\"))");

i.e., enclose the value in double quotes, to make it a STRING.

I think Dheeraj Kakar wrote:
> Hi all,
> 
> This is what I'm trying to do:
> 
> I have a cleanup rule for all accounts
> 
> (defrule cleanup
> (declare (salience 2000))
> 
> ?f_event <- (Rollup-Event clear_all)
> (Rulenumrollup
> (OBJECT ?obj1)
> (rollupdone "YES" ))
> 
> =>
> 
> (call ?obj1 clearAll))
> 
> (defrule retract_cleanup_fact
> (declare (salience 1999))
> ?f_event <- (Rollup-Event ?rollup_event)
> =>
> (retract ?f_event))
> 
>   And a cleanup rule for a specific account
> 
> (defrule account_cleanup
> (declare (salience 2000))
> 
> ?f_event <- (Rollup-Event clear ?acct_no)
> (Rulenumrollup
> (OBJECT ?obj1)
> (rollupdone "YES")
> (accountnumber ?acct_no))
> 
> =>
> 
> (call ?obj1 clearAll))
> 
> (defrule retract_account_cleanup_fact
> (declare (salience 1999))
> ?f_event <- (Rollup-Event ?rollup_event ?acct_no)
> =>
> (retract ?f_event))
> 
> 
> 
> 
> 
> In one part of the application I do
> "(assert (Rollup-Event clear_all))"
> 
> This is matched by defrule cleanup and all is well.
> 
> In another part I do
> 
> "Rollup-Event clear " + accnum.toString()
> 
> This doesn't match anything. Do you see anything wrong here?
> 
> Any help is greatly appreciated.
> 
> Dheeraj
> 
> --------------------------------------------------------------------
> 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]
> --------------------------------------------------------------------
> 



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to