JESS: JessML and metaphors

2009-09-01 Thread Nguyen, Son
Hi, I am looking for ways to have additional data in JessML to represent concepts such as decision tables. Looking at the Jess schema, the 'properties' seem to be a good place to add more data. The properties of the rule seem to fit the bill. However, I did not see any api of the Defrule class

RE: JESS: JessML and metaphors

2009-09-02 Thread Nguyen, Son
and the JessML properties are completely unrelated. Rule metadata may be added to Jess in the future, but right now there's no way to get Jess to carry arbitrary rule properties around -- sorry. You'll have to store this data separately. On Sep 1, 2009, at 2:13 PM, Nguyen, Son wrote: Hi, I am

RE: JESS: Accessing Java objects fields from a defrule

2009-09-04 Thread Nguyen, Son
Hi, I am wondering whether the following would accomplish what you wanted. Here is the complete clp file. You can change the weight of the door at the bottom of the clp file. (import House) (import Door) (deftemplate House (declare (from-class House) (include-variables

JESS: Rule LHS patterns and multiple hierarchical object models.

2009-09-04 Thread Nguyen, Son
Hi, My goal is to have logical expressions in rule LHS involving multiple templates derived from hierarchical Java models: public class PO { public Customer customer; // setter, getter not shown. } public class Customer { public String name; public Address

Re: JESS: Rule LHS patterns and multiple hierarchical object models.

2009-09-07 Thread Nguyen, Son
Thanks, Mike, for offering other solutions. It is always refreshing to see different solutions to the same problem As to the idea of writing methods to assist, it is not a viable solution for me because my solution has to be dynamic as the end users can pick and choose whatever fields of a data

JESS: Fact modified and JessListener

2009-10-01 Thread Nguyen, Son
Hi, My goal is to capture fact modification events for shadow facts. I have a Java class which I use to create a def template: (import FactChanged) (deftemplate FactChanged (declared (from-class FactChanged) (include-variables TRUE))) I define the following to capture

JESS: XMLPrinter and class loading.

2009-11-16 Thread Nguyen, Son
Hi, I am wondering why XMLPrinter must load classes that are imported. Turning clp into jessML could be done during desing time without the need of the imported classes. It is at runtime that the Rule engine needs the imported classes. Any help is appreciated. Son Nguyen

JESS: Order of execution of RHS, evaluation of LHS

2010-06-02 Thread Nguyen, Son
Hi, I am wondering what the order of evaluation of the LHS is when there are multiple patterns. Is it as they appear, top to botton and left to right? How about the order of execution of the RHS assuming there are many function calls. Is it sequential? Any feedback is greatly appreciated. Son

JESS: Rete.reset() and working memory

2010-06-04 Thread Nguyen, Son
Hi, I use Jess in a Java program. My clp file has the following template definition and a few rules but no asserts, no deffacts, no definstances. (deftemplate moduleName::JavaObjecType (declare (from-class JavaObjecType))) The clp file is batched by the Java program. I then set the current

RE: JESS: Rete.reset() and working memory

2010-06-04 Thread Nguyen, Son
To: jess-users Subject: Re: JESS: Rete.reset() and working memory Definstances are like deffacts -- reset resets them, it doesn't delete them. Use (undefinstance *) to remove all definstances. On Jun 4, 2010, at 4:59 PM, Nguyen, Son wrote: Hi, I use Jess in a Java program. My clp file has

RE: JESS: Rete.reset() and working memory

2010-06-05 Thread Nguyen, Son
Of Ernest Friedman-Hill Sent: Friday, June 04, 2010 9:48 PM To: jess-users Subject: Re: JESS: Rete.reset() and working memory On Jun 4, 2010, at 6:56 PM, Nguyen, Son wrote: The only facts that I indirectly add are shadow facts created when the Java objects are added to the working memory. Rete.reset

JESS: Slot specific, nested Java objects and from-class templates

2011-03-03 Thread Nguyen, Son
Hi, I have templates defined from Java classes using the from-class property. These Java classes can have other Java classes as their members. Jess slot specific applies to the slots of these templates, not the nested Java members. I want to be able to have a rule reevaluated only if the Java

JESS: RE: Simple patterns, non initialized Java beans.

2011-03-11 Thread Nguyen, Son
Hi, Sorry, the previous mail was sent prematurely. There seems to be an issue with simple patterns and non initialized slots derived from Java Beans. I have the following class and a clp: public class Slots { private Short age; public Slots() { //age =

JESS: Performance, Java static method vs Java oject method calls.

2011-10-21 Thread Nguyen, Son
Hi, I observed a real dramatic difference in performace when using the following two ways to get the same result. (bind ?value (?stringObject codePointAt 0)) (bind ?value (Helper.stringCodePointAt ?stringObject 0)) I did some not so scientific measurements with the following clp: (deftemplate

RE: JESS: RE: Performance, Java static method vs Java oject method calls.

2011-10-24 Thread Nguyen, Son
: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On Behalf Of Nguyen, Son Sent: Friday, October 21, 2011 5:14 PM To: jess-users Subject: JESS: Performance, Java static method vs Java oject method calls. Hi, I observed

JESS: [EXTERNAL] Jess in a multithreaded environment

2012-12-18 Thread Nguyen, Son
Hi Jess experts, We use Jess in a multi-threaded environment and have experienced some performance degradation when going from a single thread to multiple threads. Our implementation uses the Slot Specific feature. Using a Java profiler, HashCodeComputer.isValueObject() stood out as one of the