I don't do the "definstance" below. I had just put that as a potential workaround. I guess I didn't proofread that well enough. Here's what the code snippet should be: *** (defrule is-clearpayment-task ?atask <- (task (verb ?v&:(verbmatch ?v "CLEARPAYMENT") )) (not (removed ?uid&:(eq ?uid (call ?atask getUID)))) => (printout t "JESS: clear payment task found" crlf) (assert (ccprep (call ?atask getPrepositionalPhrase (new java.lang.String "WITHCREDITCARD")) (call ?atask getPreferredValue 3) )) ----- Original Message ----- From: "Ed Meier" <[EMAIL PROTECTED]> To: "Jess" <[EMAIL PROTECTED]> Sent: Friday, September 29, 2000 3:07 PM Subject: JESS: fact to external address? > Jess Wizards, > Thanks again for all your previous help. I have another ponderer. Well, > it's hard for me anyway. > > I have some rules that work with definstance facts. That is I defclass the > classes, and when certain definstances come along I want to act on them. > Simple enough. What seems to be happening though is that when the > definstance item hits the "execute" part of the rule it is only a fact. I > get "Not an external address: "<Fact-0>" (type = FACT_ID). > > Here are the relevant snippets of the code: > > *** > (deftemplate task class.path.to.TaskImpl) > > (defrule is-clearpayment-task > ?atask <- (task (verb ?v&:(verbmatch ?v "CLEARPAYMENT") )) > (not (removed ?uid&:(eq ?uid (call ?atask getUID)))) > => > (printout t "JESS: clear payment task found" crlf) > (definstance task ?atask static) > (assert (ccprep (call ?atask getPrepositionalPhrase (new java.lang.String > "WITHCREDITCARD")) (call ?atask getPreferredValue 3) )) > ) > > **** > Here's part of the error text: > > JESS: clear payment task found > Jess reported an error in routine Value.externalAddressValue while executing > (ca > ll ?atask getPrepositionalPhrase (new java.lang.String "WITHCREDITCARD")) > while > executing (assert (ccprep (call ?atask getPrepositionalPhrase (new > java.lang.Str > ing "WITHCREDITCARD")) (call ?atask getPreferredValue 3))) while executing > defru > le is-clearpayment-task while executing (run). > Message: Not an external address: "<Fact-1>" (type = FACT_ID). > Program text: ( run ) at line 40. > at jess.Value.typeError(Value.java:373) > > *** > > Am I not allowed to "call" from the execution part of a rule? Is there a > converter function? Or am I not thinking "Jess thoughts" enough yet? > > TIA, > Ed Meier > [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > 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] > --------------------------------------------------------------------- > > --------------------------------------------------------------------- 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] ---------------------------------------------------------------------
