Re: JESS: Re: Real deftemplate of extended fact - Solved it!

2007-06-29 Thread Wolfgang Laun
This Userfunction is another way of getting the deftemplate name of some fact: http://herzberg.ca.sandia.gov/jesswiki/view?GetTemplateUserFunction HTH Wolfgang Henrique Lopes Cardoso wrote: Hi, Just to let you know that I solved my own problem. I had not realized that with a query like

JESS: Re: Real deftemplate of extended fact - Solved it!

2007-06-18 Thread Henrique Lopes Cardoso
Hi, Just to let you know that I solved my own problem. I had not realized that with a query like (defquery q (declare (variables ?foo)) ?x - (t (foo ?foo)) ) I can access variable ?x and turn it into a fact object (although I have done it before). I then did something like: QueryResult

Re: JESS: Re: Real deftemplate of extended fact - Solved it!

2007-06-18 Thread Ernest Friedman-Hill
On Jun 18, 2007, at 7:19 AM, Henrique Lopes Cardoso wrote: QueryResult qr = jess.runQueryStar(q, new ValueVector().add(1)); qr.next(); qr.get(x).factValue(engine.getGlobalContext()).getDeftemplate ().getBaseName() Is there an easier way to do it? No, not really. There's two parts to