RE: JESS: [EXTERNAL] Adding facts that are instances of from-class deftemplates

2013-05-21 Thread Friedman-Hill, Ernest
The thing is that after this code: (deftemplate Person (declare (from-class Person))) (bind ?f (assert (Person (name Henrique) (age 38 There's no way to transfer those property values to a Person object; i.e., if you then said (modify ?f (OBJECT (new Person))) Then the Person's name

Re: JESS: [EXTERNAL] Adding facts that are instances of from-class deftemplates

2013-05-21 Thread Henrique Lopes Cardoso
Got that, thanks a lot. Henrique On Thu, May 16, 2013 at 3:24 PM, Friedman-Hill, Ernest ejfr...@sandia.govwrote: The thing is that after this code: (deftemplate Person (declare (from-class Person))) (bind ?f (assert (Person (name Henrique) (age 38 There's no way to transfer

Re: JESS: [EXTERNAL] Adding facts that are instances of from-class deftemplates

2013-05-16 Thread Henrique Lopes Cardoso
Thanks for the dog analogy... But going back to practical uses, one aspect that I like when creating a fact directly from a from-class template (i.e., a doghouse without a dog -- I can still make some reasoning over the doghouse) is that the Jess code to do it is much more readable and compact,

RE: JESS: [EXTERNAL] Adding facts that are instances of from-class deftemplates

2013-05-10 Thread Friedman-Hill, Ernest
The *real* way to add shadow facts is using the definstance function. It has a number of options that aren't available with add. The add function was added to Jess to support the simplified semantics of JSR-94 (the javax.rules API) but the intent is that most Jess users will use definstance.