There is a "matches" command which displays this info textually, but
it's not easily available at a lower level. You can actually register
JessListeners with the individual 2-input nodes of the Rete network;
this is intended as a debugging tool, though, not something you'd use
in an application, so there's no easy-to-use API for it. The Defrule
class has a getNodes() method, which returns an Iterator over the
jess.Node objects that make up that rule's Rete network. You can go
through that iterator looking for instances of jess.NodeJoin (a
package-level class) and using Node.addJessListener to register a
callback. None of this is for the faint of heart :)
On Nov 19, 2007, at 2:53 AM, Alfonso González wrote:
Hello
We have developed a behaviour’s data driven application: when rules
change data model, behaviour changes. Model is some kind of
network. Each time system know a new case, we copy some piece of
the model in order to rules modifies the copy, but not the model
(model is protected from rules). But not all cases will fire rules,
so is not efficient to build all the copy each time, when maybe
there wont be rules going to fire. So the more efficient way to
build the copy is: step to step exploring diferent paths, and being
able to predict not succesfull paths and then cancel this not
succesfull path in advance. Supposed a rule will fire 4 steps next,
so step 1, 2 and 3 partial macthes must be happen. So, for each new
path, after every step, I could wacth if new partial matches has
happen, and if not, we can cancel this path a go in depth with
other path. So the question is: is ther any way to listen partial
matches being happens, and can I know number of partial matches
from each rule or from a group of rules?
Thank you in advance
Alfonso González
---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://www.jessrules.com
--------------------------------------------------------------------
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]
--------------------------------------------------------------------