<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:www.nabble.com,2006:forum-2643</id>
	<title>Nabble - Jess</title>
	<updated>2008-07-03T11:04:08Z</updated>
	<link rel="self" type="application/atom+xml" href="http://www.nabble.com/Jess-f2643.xml" />
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Jess-f2643.html" />
	<subtitle type="html">Jess is a rule engine and scripting environment written entirely in Sun's JavaTM language by Ernest Friedman-Hill at Sandia National Laboratories in Livermore, CA. Jess was originally inspired by the CLIPS expert system shell, but has grown into a complete, distinct, dynamic environment of its own. Using Jess, you can build Java software that has the capacity to 'reason' using knowledge you supply in the form of declarative rules. Jess is small, light, and one of the fastest rule engines available.</subtitle>
	
<entry>
	<id>tag:www.nabble.com,2006:post-18265266</id>
	<title>RE: JESS: Rule comparing slot values that can be omitted</title>
	<published>2008-07-03T11:04:08Z</published>
	<updated>2008-07-03T11:04:08Z</updated>
	<author>
		<name>rrogers-2</name>
	</author>
	<content type="html">I have a similar situation but I wanted to be able to distinguish NIL
&lt;br&gt;cases. &amp;nbsp;I used the defadvice to wrap the various numeric comparison
&lt;br&gt;operators to handle this in the way I wanted. &amp;nbsp;In my case, I treat NIL
&lt;br&gt;as &amp;quot;unknown&amp;quot; and all of the tests fail (e.g. NIL is neither greater,
&lt;br&gt;less, or equal to any number).
&lt;br&gt;&lt;br&gt;E.g.
&lt;br&gt;;If any argument to &amp;gt; is NIL, then the test fails
&lt;br&gt;(defadvice before &amp;gt; (foreach ?arg $?argv (if (eq ?arg nil) then (return
&lt;br&gt;FALSE))))
&lt;br&gt;&lt;br&gt;-Russ
&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18265266&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18265266&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;]
&lt;br&gt;On Behalf Of Henrique Lopes Cardoso
&lt;br&gt;Sent: Thursday, July 03, 2008 1:29 PM
&lt;br&gt;To: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18265266&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jess-users@...&lt;/a&gt;
&lt;br&gt;Subject: JESS: Rule comparing slot values that can be omitted
&lt;br&gt;&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;I have tried the straightforward example below. I define two simple
&lt;br&gt;deftemplates and a rule that compares their slots, which are assumed to
&lt;br&gt;be numeric. Then, I incidentally assert a fact on which I do not define
&lt;br&gt;a value for a slot.
&lt;br&gt;When the rule is evaluated (after the second assertion), I immediately
&lt;br&gt;get an error.
&lt;br&gt;&lt;br&gt;Now, I understand the error. But maybe Jess should be nicer by noticing
&lt;br&gt;that if the comparison cannot be made, then it should simply not fire
&lt;br&gt;the rule (quietly).
&lt;br&gt;&lt;br&gt;Henrique
&lt;br&gt;&lt;br&gt;---
&lt;br&gt;Jess, the Rule Engine for the Java Platform Copyright (C) 2008 Sandia
&lt;br&gt;Corporation Jess Version 7.1RC1 6/23/2008
&lt;br&gt;&lt;br&gt;Jess&amp;gt; (deftemplate a (slot s))
&lt;br&gt;TRUE
&lt;br&gt;Jess&amp;gt; (deftemplate b (slot s))
&lt;br&gt;TRUE
&lt;br&gt;Jess&amp;gt; (defrule r1 (a (s ?sa)) (b {s &amp;lt; ?sa}) =&amp;gt; (printout t &amp;quot;Yes!&amp;quot; crlf))
&lt;br&gt;TRUE
&lt;br&gt;Jess&amp;gt; (assert (a))
&lt;br&gt;&amp;lt;Fact-0&amp;gt;
&lt;br&gt;Jess&amp;gt; (assert (b (s 1)))
&lt;br&gt;Jess reported an error in routine &amp;lt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while executing (&amp;lt; ?__synth0(1,0,-1) ?sa(0,0,-1))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while executing rule LHS (Node2)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while executing rule LHS (TECT)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while executing (assert (MAIN::b (s 1))).
&lt;br&gt;&amp;nbsp; Message: Not a number: nil.
&lt;br&gt;&amp;nbsp; Program text: ( assert ( b ( s 1 ) ) ) &amp;nbsp;at line 5.
&lt;br&gt;Jess&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18265266&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18265266&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list (use
&lt;br&gt;your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18265266&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18265266&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18265266&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18265266&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Rule-comparing-slot-values-that-can-be-omitted-tp18264775p18265266.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18265012</id>
	<title>Re: JESS: Rule comparing slot values that can be omitted</title>
	<published>2008-07-03T10:53:27Z</published>
	<updated>2008-07-03T10:53:27Z</updated>
	<author>
		<name>Ernest Friedman-Hill</name>
	</author>
	<content type="html">On Jul 3, 2008, at 1:29 PM, Henrique Lopes Cardoso wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Now, I understand the error. But maybe Jess should be nicer by &amp;nbsp;
&lt;br&gt;&amp;gt; noticing
&lt;br&gt;&amp;gt; that if the comparison cannot be made, then it should simply not fire
&lt;br&gt;&amp;gt; the rule (quietly).
&lt;br&gt;&lt;br&gt;&lt;br&gt;In general, you can just use a more appropriate default for the slot. &amp;nbsp;
&lt;br&gt;Here, you could use
&lt;br&gt;&lt;br&gt;(deftemplate b (slot s (default 0)))
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------
&lt;br&gt;Ernest Friedman-Hill
&lt;br&gt;Informatics &amp; Decision Sciences, Sandia National Laboratories
&lt;br&gt;PO Box 969, MS 9012, Livermore, CA 94550
&lt;br&gt;&lt;a href=&quot;http://www.jessrules.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.jessrules.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18265012&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18265012&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18265012&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Rule-comparing-slot-values-that-can-be-omitted-tp18264775p18265012.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18264775</id>
	<title>JESS: Rule comparing slot values that can be omitted</title>
	<published>2008-07-03T10:29:29Z</published>
	<updated>2008-07-03T10:29:29Z</updated>
	<author>
		<name>Henrique Lopes Cardoso</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I have tried the straightforward example below. I define two simple
&lt;br&gt;deftemplates and a rule that compares their slots, which are assumed to
&lt;br&gt;be numeric. Then, I incidentally assert a fact on which I do not define
&lt;br&gt;a value for a slot.
&lt;br&gt;When the rule is evaluated (after the second assertion), I immediately
&lt;br&gt;get an error.
&lt;br&gt;&lt;br&gt;Now, I understand the error. But maybe Jess should be nicer by noticing
&lt;br&gt;that if the comparison cannot be made, then it should simply not fire
&lt;br&gt;the rule (quietly).
&lt;br&gt;&lt;br&gt;Henrique
&lt;br&gt;&lt;br&gt;---
&lt;br&gt;Jess, the Rule Engine for the Java Platform
&lt;br&gt;Copyright (C) 2008 Sandia Corporation
&lt;br&gt;Jess Version 7.1RC1 6/23/2008
&lt;br&gt;&lt;br&gt;Jess&amp;gt; (deftemplate a (slot s))
&lt;br&gt;TRUE
&lt;br&gt;Jess&amp;gt; (deftemplate b (slot s))
&lt;br&gt;TRUE
&lt;br&gt;Jess&amp;gt; (defrule r1 (a (s ?sa)) (b {s &amp;lt; ?sa}) =&amp;gt; (printout t &amp;quot;Yes!&amp;quot; crlf))
&lt;br&gt;TRUE
&lt;br&gt;Jess&amp;gt; (assert (a))
&lt;br&gt;&amp;lt;Fact-0&amp;gt;
&lt;br&gt;Jess&amp;gt; (assert (b (s 1)))
&lt;br&gt;Jess reported an error in routine &amp;lt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while executing (&amp;lt; ?__synth0(1,0,-1) ?sa(0,0,-1))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while executing rule LHS (Node2)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while executing rule LHS (TECT)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while executing (assert (MAIN::b (s 1))).
&lt;br&gt;&amp;nbsp; Message: Not a number: nil.
&lt;br&gt;&amp;nbsp; Program text: ( assert ( b ( s 1 ) ) ) &amp;nbsp;at line 5.
&lt;br&gt;Jess&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18264775&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18264775&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18264775&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Rule-comparing-slot-values-that-can-be-omitted-tp18264775p18264775.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18248594</id>
	<title>RE: JESS: Modifying a fact from the current activation</title>
	<published>2008-07-02T15:35:34Z</published>
	<updated>2008-07-02T15:35:34Z</updated>
	<author>
		<name>Robert Kirby</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;body&gt;
Activation records seem more like part of the implementation than
something to use in ordinary code.&amp;nbsp; If more than one fact is part of
the activation record, then it may be tricky to identify the fact to
modify.&amp;nbsp; Perhaps the matching facts could be passed as additional
parameters to deffunctions.&amp;nbsp; The ModClass1 rule below would
become:&lt;br&gt;&lt;br&gt;
(defrule ModClass1&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ?Class1 &amp;lt;-&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (Class1&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (A ?a)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (B $? ?var1 $?))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (modify ?Class1 (A &amp;quot;123&amp;quot;)))&lt;br&gt;&lt;br&gt;
Bob Kirby&lt;br&gt;&lt;br&gt;
At 08:55 AM 7/2/2008, Greenblatt, Alan wrote&lt;b&gt;:&lt;br&gt;
&lt;/b&gt;&lt;blockquote type=cite class=cite cite=&quot;&quot;&gt;Got it, thanks very
much.&amp;nbsp; I'd agree, adding this to the Javadoc for&lt;br&gt;
jess.Token.fact() would be a great idea.&lt;br&gt;&lt;br&gt;
- Alan &lt;br&gt;&lt;br&gt;
-----Original Message-----&lt;br&gt;
From: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18248594&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;
[&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18248594&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;]&lt;br&gt;
On Behalf Of Ernest Friedman-Hill&lt;br&gt;
Sent: Tuesday, July 01, 2008 5:52 PM&lt;br&gt;
To: jess-users&lt;br&gt;
Subject: Re: JESS: Modifying a fact from the current activation&lt;br&gt;&lt;br&gt;
Hi Alan:&lt;br&gt;&lt;br&gt;
To make a long story short: you need to call getIcon() on the Fact&lt;br&gt;
instances you extract here, and use the new Facts returned by them.
As&lt;br&gt;
the Javadoc for getIcon() says&lt;br&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return the canonical representation of this Fact
object. For most&lt;br&gt;
Facts, this returns &amp;quot;this&amp;quot;, but for certain Facts -- in
particular,&lt;br&gt;
for Facts extracted from jess.Token&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objects -- it may return another object. If you
are examining a&lt;br&gt;
jess.Token object and obtain a reference to a Fact from that Token,&lt;br&gt;
then call getIcon() to &amp;quot;canonicalize&amp;quot;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; that Fact before using it.&lt;br&gt;&lt;br&gt;
I should add a note about this issue to the Javadoc for&lt;br&gt;
jess.Token.fact().&lt;br&gt;&lt;br&gt;
For those interested in the underlying explanation: the facts
returned&lt;br&gt;
from Token.fact() may -- in the case of a fact with a multifield
that&lt;br&gt;
is explicitly matched by the rule -- return not the &amp;quot;actual&amp;quot;
fact, but&lt;br&gt;
a sort of &amp;quot;view&amp;quot; of the fact, that describes how the multifield
is&lt;br&gt;
matched. The getIcon() method returns the &amp;quot;actual&amp;quot; fact
associated&lt;br&gt;
with the view.&lt;br&gt;&lt;br&gt;
&lt;br&gt;
On Jul 1, 2008, at 5:04 PM, Greenblatt, Alan wrote:&lt;br&gt;
&lt;blockquote type=cite class=cite cite=&quot;&quot;&gt;I have a series of rules which
call a Java user function when they&amp;nbsp; &lt;br&gt;
fire which among other things, sometimes needs to get the list of&amp;nbsp;
&lt;br&gt;
facts which caused the rule to fire and then modify a certain slot&amp;nbsp;
&lt;br&gt;
in those facts.&lt;br&gt;&lt;br&gt;
Perhaps I have a misunderstanding of how the current activation&amp;nbsp;
&lt;br&gt;
works ((engine) getThisAcivation), but I was under the impression&amp;nbsp;
&lt;br&gt;
that if you get the Token from the Activation, you can get at the&amp;nbsp;
&lt;br&gt;
Facts which contributed to the current rule firing.&lt;br&gt;&lt;br&gt;
I've simulated this with the following simple code, which produces&amp;nbsp;
&lt;br&gt;
an exception:&lt;br&gt;
(deftemplate Class1&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (slot A)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (multislot B))&lt;br&gt;&lt;br&gt;
(defrule ModClass1&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (Class1&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (A ?a)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (B $? ?var1 $?))&lt;br&gt;
=&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (bind ?token (((engine) getThisActivation)
getToken))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (bind ?fact1 (?token fact 0))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (modify ?fact1 (A &amp;quot;123&amp;quot;)))&lt;br&gt;&lt;br&gt;
(reset)&lt;br&gt;&lt;br&gt;
(assert&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (Class1&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (A &amp;quot;abc&amp;quot;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (B &amp;quot;def&amp;quot;)))&lt;br&gt;&lt;br&gt;
(run)&lt;br&gt;&lt;br&gt;
When run this, I get the following exception: Fact object not in&amp;nbsp;
&lt;br&gt;
working memory (MAIN::Class1 (A &amp;quot;abc&amp;quot;) (B &amp;quot;def&amp;quot;
)).&lt;br&gt;&lt;br&gt;
Evidently, this is because ?fact1 is not identical to the Fact&amp;nbsp;
&lt;br&gt;
returned from:&lt;br&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (bind ?fact2 ((engine)
findFactByID (?fact1 getFactId)))&lt;br&gt;&lt;br&gt;
It turns out that if I modify ?fact2 instead of ?fact1, I'm good to&amp;nbsp;
&lt;br&gt;
go.&amp;nbsp; Can someone please explain to me what is going on here?&amp;nbsp;
Why is&amp;nbsp; &lt;br&gt;
fact2 different from fact1?&lt;br&gt;&lt;br&gt;
Here's a version of the code from above that works just fine:&lt;br&gt;&lt;br&gt;
(deftemplate Class1&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (slot A)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (multislot B))&lt;br&gt;&lt;br&gt;
(defrule ModClass1&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (Class1&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (A ?a)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (B $? ?var1 $?))&lt;br&gt;
=&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (bind ?token (((engine) getThisActivation)
getToken))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (bind ?fact1 (?token fact 0))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (bind ?fact2 ((engine) findFactByID (?fact1
getFactId)))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (modify ?fact2 (A &amp;quot;123&amp;quot;)))&lt;br&gt;&lt;br&gt;
(reset)&lt;br&gt;&lt;br&gt;
(assert&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (Class1&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (A &amp;quot;abc&amp;quot;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (B &amp;quot;def&amp;quot;)))&lt;br&gt;&lt;br&gt;
(run)&lt;br&gt;&lt;br&gt;
&lt;br&gt;
Thanks very much,&lt;br&gt;&lt;br&gt;
Alan&lt;/blockquote&gt;&lt;br&gt;
---------------------------------------------------------&lt;br&gt;
Ernest Friedman-Hill&lt;br&gt;
Informatics &amp;amp; Decision Sciences, Sandia National Laboratories PO
Box&lt;br&gt;
969, MS 9012, Livermore, CA 94550
&lt;a href=&quot;http://www.jessrules.com&quot; eudora=&quot;autourl&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;
http://www.jessrules.com&lt;/a&gt;&lt;/blockquote&gt;&lt;/body&gt;
&lt;/html&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Modifying-a-fact-from-the-current-activation-tp18225983p18248594.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18244733</id>
	<title>Re: JESS: referring to an external database</title>
	<published>2008-07-02T11:49:45Z</published>
	<updated>2008-07-02T11:49:45Z</updated>
	<author>
		<name>seyed hossein</name>
	</author>
	<content type="html">&lt;div&gt;Thanks alot for the reply Dr. Friedman-Hill, &lt;/div&gt;
&lt;div&gt;it really helped. And sorry if my questions are too basic, with my little knowledge of programming (1st~2nd year university) it takes me a while to apply the functions in the manual.&lt;/div&gt;
&lt;div&gt;For anyone facing the problem I raised in my example, the (batch &amp;quot;path to your database&amp;quot;)&amp;nbsp;is the best, but you have&amp;nbsp;to define facts in your database properly (with templates and facts...).&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;gmail_quote&quot;&gt;On 7/2/08, &lt;b class=&quot;gmail_sendername&quot;&gt;Ernest Friedman-Hill&lt;/b&gt; &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18244733&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ejfried@...&lt;/a&gt;&amp;gt; wrote:&lt;/span&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid&quot;&gt;&lt;span&gt;On Jul 2, 2008, at 12:52 PM, seyed hossein wrote:&lt;br&gt;&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid&quot;&gt;Hi,&lt;br&gt;How is the procedure of recalling facts from other Jess classes (possibly from a Jess database) into a Jess class containing rules/functions? I tried the load-facts function, as shown bellow, but it seems not working.&lt;br&gt;
&lt;/blockquote&gt;&lt;br&gt;&lt;/span&gt;The documentation for load-facts (&lt;a href=&quot;http://www.jessrules.com/jess/docs/71/functions.html#load-facts&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.jessrules.com/jess/docs/71/functions.html#load-facts&lt;/a&gt;) is pretty clear, I think, that the file should contain the facts only; not &amp;quot;deffacts&amp;quot; or anything else. &amp;quot;batch&amp;quot; and &amp;quot;require&amp;quot; can load arbitrary Jess code, including deffacts.&lt;br&gt;
&lt;br&gt;So have you read the manual? It&amp;#39;s worth reading the whole thing through at least once.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------&lt;br&gt;Ernest Friedman-Hill&lt;br&gt;Informatics &amp;amp; Decision Sciences, Sandia National Laboratories&lt;br&gt;
PO Box 969, MS 9012, Livermore, CA 94550&lt;br&gt;&lt;a href=&quot;http://www.jessrules.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.jessrules.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------&lt;br&gt;
To unsubscribe, send the words &amp;#39;unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18244733&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;&amp;#39;&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18244733&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list&lt;br&gt;
(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18244733&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.&lt;br&gt;--------------------------------------------------------------------&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-referring-to-an-external-database-tp18242250p18244733.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18243544</id>
	<title>Re: JESS: A question of optimisation</title>
	<published>2008-07-02T10:52:43Z</published>
	<updated>2008-07-02T10:52:43Z</updated>
	<author>
		<name>James C. Owen</name>
	</author>
	<content type="html">Just one thought - &amp;nbsp;you might also also modify the care-unit as well
&lt;br&gt;to remove the available bed.
&lt;br&gt;&lt;br&gt;SDG
&lt;br&gt;jco
&lt;br&gt;co-founder &amp; director Dallas Rules Group
&lt;br&gt;sponsor October Rules Fest business rules conference Oct 22-24 Dallas,
&lt;br&gt;TX
&lt;br&gt;&lt;br&gt;&amp;quot;I never saw a wild thing sorry for itself.
&lt;br&gt;A small bird will drop frozen dead from a bough
&lt;br&gt;without ever having felt sorry for itself&amp;quot;
&lt;br&gt;David Herbert Lawrence.
&lt;br&gt;(Also in the Movie, &amp;quot;G I Jane&amp;quot;)
&lt;br&gt;&lt;br&gt;On Jul 2, 2008, at 7:51 AM, Peter Lin wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; the example confuses me a bit. If I had to do the same thing the rule
&lt;br&gt;&amp;gt; might look like this.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (defrule assignBed
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;?patient &amp;lt;- (patient
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(id ?p)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(unit ?u)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(bed ?b&amp;:(eq ?b 0) ) ;; if the patient hasn't been assinged.
&lt;br&gt;&amp;gt; assuming unassigned is zero
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;(care-unit
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(id ?u) ;; join on the patient's assigned care-unit
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(availableBeds ?beds&amp;:(&amp;gt; ?beds 0) ) ;; checks to see if unit
&lt;br&gt;&amp;gt; has available bed
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;(bed
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(id ?bedid) ;; bind bed id to variable &amp;quot;?bedid&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(unit ?u) ;; join on the care-unit
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;)
&lt;br&gt;&amp;gt; =&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;(modify ?patient (bed ?bedid) )
&lt;br&gt;&amp;gt; )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The example in the email wouldn't work, since it would only match
&lt;br&gt;&amp;gt; patients that are already assigned to a bed in a care unit. I'm
&lt;br&gt;&amp;gt; guessing, you only want to assign beds to patients without an assigned
&lt;br&gt;&amp;gt; bed. The first pattern checks to make sure it doesn't try to find a
&lt;br&gt;&amp;gt; bed for patient that already has one.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; doing it this way, the search space should be considerably smaller.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; peter
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Wed, Jul 2, 2008 at 8:44 AM, Florian Fischer
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18243544&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;florian.fischer@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I have a question about optimizing a query in Jess.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I have (let's take round numbers) 100 care units. &amp;nbsp;Each care unit
&lt;br&gt;&amp;gt;&amp;gt; has 20
&lt;br&gt;&amp;gt;&amp;gt; beds and on average 10 patients.
&lt;br&gt;&amp;gt;&amp;gt; I want to match patients to their beds. &amp;nbsp;A patient has an attribute
&lt;br&gt;&amp;gt;&amp;gt; giving its current bed.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I could write something like
&lt;br&gt;&amp;gt;&amp;gt; (defrule ...
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;(bed (id ?b))
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;(patient (id ?p) (bed ?b))
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;(not (the patient is attached to the bed))
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;=&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;(attach the patient to the bed)
&lt;br&gt;&amp;gt;&amp;gt; )
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; but then, each patient is compared to each bed, which takes 2
&lt;br&gt;&amp;gt;&amp;gt; millions
&lt;br&gt;&amp;gt;&amp;gt; comparisons. &amp;nbsp;I'd like to optimize that by first matching a patient
&lt;br&gt;&amp;gt;&amp;gt; to
&lt;br&gt;&amp;gt;&amp;gt; its care unit and then comparing the patient with the beds of that
&lt;br&gt;&amp;gt;&amp;gt; care
&lt;br&gt;&amp;gt;&amp;gt; unit. &amp;nbsp;That would take 1000*100 tests to match patients to care units
&lt;br&gt;&amp;gt;&amp;gt; and then 1000*20 tests to find the right bed. &amp;nbsp;That is 120'000
&lt;br&gt;&amp;gt;&amp;gt; instead
&lt;br&gt;&amp;gt;&amp;gt; of 2'000'000 comparisons.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; So I would write something like this:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; (defrule ...
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;(care-unit (id ?u))
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;(bed (id ?b) (unit ?u))
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;(patient (id ?p) (unit ?u) (bed ?b))
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;(not (the patient is attached to the bed))
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;=&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;(attach the patient to the bed)
&lt;br&gt;&amp;gt;&amp;gt; )
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; but will it work? &amp;nbsp;Will the matching of patients to care units be
&lt;br&gt;&amp;gt;&amp;gt; factored out and then compared only to the beds matching the care
&lt;br&gt;&amp;gt;&amp;gt; unit,
&lt;br&gt;&amp;gt;&amp;gt; or will each patient be checked against each of the 20000
&lt;br&gt;&amp;gt;&amp;gt; intermediates
&lt;br&gt;&amp;gt;&amp;gt; results of the first 2 lines?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Best regards,
&lt;br&gt;&amp;gt;&amp;gt; Florian Fischer
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18243544&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; '
&lt;br&gt;&amp;gt;&amp;gt; in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18243544&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;&amp;gt;&amp;gt; (use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18243544&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; .
&lt;br&gt;&amp;gt;&amp;gt; --------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, send the words 'unsubscribe jess-users
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18243544&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;&amp;gt; in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18243544&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;&amp;gt; (use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18243544&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; .
&lt;br&gt;&amp;gt; --------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18243544&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18243544&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18243544&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Installing-Fuzzy-on-Jess-tp18198490p18243544.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18243038</id>
	<title>Re: JESS: referring to an external database</title>
	<published>2008-07-02T10:40:52Z</published>
	<updated>2008-07-02T10:40:52Z</updated>
	<author>
		<name>Ernest Friedman-Hill</name>
	</author>
	<content type="html">On Jul 2, 2008, at 12:52 PM, seyed hossein wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; How is the procedure of recalling facts from other Jess classes &amp;nbsp;
&lt;br&gt;&amp;gt; (possibly from a Jess database) into a Jess class containing rules/ 
&lt;br&gt;&amp;gt; functions? I tried the load-facts function, as shown bellow, but it &amp;nbsp;
&lt;br&gt;&amp;gt; seems not working.
&lt;br&gt;&lt;br&gt;The documentation for load-facts (&lt;a href=&quot;http://www.jessrules.com/jess/docs/71/functions.html#load-facts&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.jessrules.com/jess/docs/71/functions.html#load-facts&lt;/a&gt;&amp;nbsp;
&lt;br&gt;) is pretty clear, I think, that the file should contain the facts &amp;nbsp;
&lt;br&gt;only; not &amp;quot;deffacts&amp;quot; or anything else. &amp;quot;batch&amp;quot; and &amp;quot;require&amp;quot; can load &amp;nbsp;
&lt;br&gt;arbitrary Jess code, including deffacts.
&lt;br&gt;&lt;br&gt;So have you read the manual? It's worth reading the whole thing &amp;nbsp;
&lt;br&gt;through at least once.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------
&lt;br&gt;Ernest Friedman-Hill
&lt;br&gt;Informatics &amp; Decision Sciences, Sandia National Laboratories
&lt;br&gt;PO Box 969, MS 9012, Livermore, CA 94550
&lt;br&gt;&lt;a href=&quot;http://www.jessrules.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.jessrules.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18243038&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18243038&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18243038&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-referring-to-an-external-database-tp18242250p18243038.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18242250</id>
	<title>JESS: referring to an external database</title>
	<published>2008-07-02T09:52:03Z</published>
	<updated>2008-07-02T09:52:03Z</updated>
	<author>
		<name>seyed hossein</name>
	</author>
	<content type="html">&lt;div&gt;Hi,&lt;/div&gt;
&lt;div&gt;How&amp;nbsp;is the procedure of&amp;nbsp;recalling facts from other Jess&amp;nbsp;classes (possibly from&amp;nbsp;a Jess&amp;nbsp;database) into a Jess class containing rules/functions? I tried the load-facts function, as shown bellow,&amp;nbsp;but it seems not working.&lt;/div&gt;

&lt;div&gt;Thanks&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;(deftemplate desk&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (slot location))&lt;/p&gt;
&lt;p&gt;(load-facts &amp;quot;c:/Documents and Settings/...workspace.../dataInput2.clp&amp;quot;)&lt;/p&gt;
&lt;p&gt;;; referring to the dataInput2.clp file containing:&lt;br&gt;;&lt;br&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (deffacts my-facts&lt;br&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (desk (location room2)))&lt;/p&gt;
&lt;p&gt;(defrule my-desk&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (desk {location == room2})&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (printout t &amp;quot;This is my desk&amp;quot; crlf))&lt;/p&gt;
&lt;p&gt;&lt;br&gt;(run)&lt;br&gt;&lt;/p&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-referring-to-an-external-database-tp18242250p18242250.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18241210</id>
	<title>RE: JESS: Modifying a fact from the current activation</title>
	<published>2008-07-02T08:55:43Z</published>
	<updated>2008-07-02T08:55:43Z</updated>
	<author>
		<name>Greenblatt, Alan</name>
	</author>
	<content type="html">Got it, thanks very much. &amp;nbsp;I'd agree, adding this to the Javadoc for
&lt;br&gt;jess.Token.fact() would be a great idea.
&lt;br&gt;&lt;br&gt;- Alan 
&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18241210&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18241210&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;]
&lt;br&gt;On Behalf Of Ernest Friedman-Hill
&lt;br&gt;Sent: Tuesday, July 01, 2008 5:52 PM
&lt;br&gt;To: jess-users
&lt;br&gt;Subject: Re: JESS: Modifying a fact from the current activation
&lt;br&gt;&lt;br&gt;Hi Alan:
&lt;br&gt;&lt;br&gt;To make a long story short: you need to call getIcon() on the Fact
&lt;br&gt;instances you extract here, and use the new Facts returned by them. As
&lt;br&gt;the Javadoc for getIcon() says
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Return the canonical representation of this Fact object. For most
&lt;br&gt;Facts, this returns &amp;quot;this&amp;quot;, but for certain Facts -- in particular,
&lt;br&gt;for Facts extracted from jess.Token
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;objects -- it may return another object. If you are examining a
&lt;br&gt;jess.Token object and obtain a reference to a Fact from that Token,
&lt;br&gt;then call getIcon() to &amp;quot;canonicalize&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;that Fact before using it.
&lt;br&gt;&lt;br&gt;I should add a note about this issue to the Javadoc for
&lt;br&gt;jess.Token.fact().
&lt;br&gt;&lt;br&gt;For those interested in the underlying explanation: the facts returned
&lt;br&gt;from Token.fact() may -- in the case of a fact with a multifield that
&lt;br&gt;is explicitly matched by the rule -- return not the &amp;quot;actual&amp;quot; fact, but
&lt;br&gt;a sort of &amp;quot;view&amp;quot; of the fact, that describes how the multifield is
&lt;br&gt;matched. The getIcon() method returns the &amp;quot;actual&amp;quot; fact associated
&lt;br&gt;with the view.
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Jul 1, 2008, at 5:04 PM, Greenblatt, Alan wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I have a series of rules which call a Java user function when they 
&lt;br&gt;&amp;gt; fire which among other things, sometimes needs to get the list of 
&lt;br&gt;&amp;gt; facts which caused the rule to fire and then modify a certain slot
&lt;br&gt;in 
&lt;br&gt;&amp;gt; those facts.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Perhaps I have a misunderstanding of how the current activation
&lt;br&gt;works 
&lt;br&gt;&amp;gt; ((engine) getThisAcivation), but I was under the impression that if 
&lt;br&gt;&amp;gt; you get the Token from the Activation, you can get at the Facts
&lt;br&gt;which 
&lt;br&gt;&amp;gt; contributed to the current rule firing.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I've simulated this with the following simple code, which produces
&lt;br&gt;an 
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; exception:
&lt;br&gt;&amp;gt; (deftemplate Class1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (slot A)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (multislot B))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (defrule ModClass1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (Class1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (A ?a)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (B $? ?var1 $?))
&lt;br&gt;&amp;gt; =&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (bind ?token (((engine) getThisActivation) getToken))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (bind ?fact1 (?token fact 0))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (modify ?fact1 (A &amp;quot;123&amp;quot;)))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (reset)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (assert
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (Class1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (A &amp;quot;abc&amp;quot;)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (B &amp;quot;def&amp;quot;)))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (run)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; When run this, I get the following exception: Fact object not in 
&lt;br&gt;&amp;gt; working memory (MAIN::Class1 (A &amp;quot;abc&amp;quot;) (B &amp;quot;def&amp;quot; )).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Evidently, this is because ?fact1 is not identical to the Fact 
&lt;br&gt;&amp;gt; returned from:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (bind ?fact2 ((engine) findFactByID (?fact1 getFactId)))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It turns out that if I modify ?fact2 instead of ?fact1, I'm good to 
&lt;br&gt;&amp;gt; go. &amp;nbsp;Can someone please explain to me what is going on here? &amp;nbsp;Why is
&lt;br&gt;&amp;gt; fact2 different from fact1?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Here's a version of the code from above that works just fine:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (deftemplate Class1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (slot A)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (multislot B))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (defrule ModClass1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (Class1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (A ?a)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (B $? ?var1 $?))
&lt;br&gt;&amp;gt; =&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (bind ?token (((engine) getThisActivation) getToken))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (bind ?fact1 (?token fact 0))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (bind ?fact2 ((engine) findFactByID (?fact1 getFactId)))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (modify ?fact2 (A &amp;quot;123&amp;quot;)))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (reset)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (assert
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (Class1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (A &amp;quot;abc&amp;quot;)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (B &amp;quot;def&amp;quot;)))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (run)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks very much,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Alan
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------
&lt;br&gt;Ernest Friedman-Hill
&lt;br&gt;Informatics &amp; Decision Sciences, Sandia National Laboratories PO Box
&lt;br&gt;969, MS 9012, Livermore, CA 94550 &lt;a href=&quot;http://www.jessrules.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.jessrules.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18241210&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18241210&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list (use
&lt;br&gt;your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18241210&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18241210&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18241210&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18241210&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Modifying-a-fact-from-the-current-activation-tp18225983p18241210.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18237881</id>
	<title>Re: JESS: The retracted fact can still fire rule</title>
	<published>2008-07-02T06:49:13Z</published>
	<updated>2008-07-02T06:49:13Z</updated>
	<author>
		<name>Ernest Friedman-Hill</name>
	</author>
	<content type="html">&lt;br&gt;On Jul 2, 2008, at 1:45 AM, Chen, Yixi wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;My Jess version is 7.0 11/1/2006.
&lt;br&gt;&amp;gt;
&lt;br&gt;That's two years and many versions ago; I believe you're reporting a &amp;nbsp;
&lt;br&gt;long-fixed bug. Try either 7.0p2 or 7.1RC1 and let us know if the &amp;nbsp;
&lt;br&gt;problem persists.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------
&lt;br&gt;Ernest Friedman-Hill
&lt;br&gt;Informatics &amp; Decision Sciences, Sandia National Laboratories
&lt;br&gt;PO Box 969, MS 9012, Livermore, CA 94550
&lt;br&gt;&lt;a href=&quot;http://www.jessrules.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.jessrules.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237881&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237881&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237881&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-The-retracted-fact-can-still-fire-rule-tp18235861p18237881.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18237827</id>
	<title>Re: JESS: A question of optimisation</title>
	<published>2008-07-02T06:45:45Z</published>
	<updated>2008-07-02T06:45:45Z</updated>
	<author>
		<name>Ernest Friedman-Hill</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;Short answer: yes, the restrictions are cumulative. In your last rule, &amp;nbsp;
&lt;br&gt;a patient is checked only against beds in their own unit -- or only &amp;nbsp;
&lt;br&gt;units containing the patient's own bed are considered (we can't know &amp;nbsp;
&lt;br&gt;just from this which way Jess will decide to evaluate the rule.)
&lt;br&gt;&lt;br&gt;But note that in no case would Jess actually do the full 2 million &amp;nbsp;
&lt;br&gt;comparisons. In the first rule, the beds would be hashed into some &amp;nbsp;
&lt;br&gt;number of buckets (depending on the total number of beds and how the &amp;nbsp;
&lt;br&gt;ids are distributed,) and the patient's bed id checked only against &amp;nbsp;
&lt;br&gt;the beds in one of those buckets. Likewise, when you add the unit &amp;nbsp;
&lt;br&gt;pattern, first the units will be divided into buckets, the beds &amp;nbsp;
&lt;br&gt;checked against units in one bucket each, and then those pairs would &amp;nbsp;
&lt;br&gt;be in buckets, with each patient checked only against the contents of &amp;nbsp;
&lt;br&gt;one bucket.
&lt;br&gt;&lt;br&gt;On Jul 2, 2008, at 8:44 AM, Florian Fischer wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have a question about optimizing a query in Jess.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have (let's take round numbers) 100 care units. &amp;nbsp;Each care unit &amp;nbsp;
&lt;br&gt;&amp;gt; has 20
&lt;br&gt;&amp;gt; beds and on average 10 patients.
&lt;br&gt;&amp;gt; I want to match patients to their beds. &amp;nbsp;A patient has an attribute
&lt;br&gt;&amp;gt; giving its current bed.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I could write something like
&lt;br&gt;&amp;gt; (defrule ...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;(bed (id ?b))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;(patient (id ?p) (bed ?b))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;(not (the patient is attached to the bed))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;=&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;(attach the patient to the bed)
&lt;br&gt;&amp;gt; )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; but then, each patient is compared to each bed, which takes 2 millions
&lt;br&gt;&amp;gt; comparisons. &amp;nbsp;I'd like to optimize that by first matching a patient to
&lt;br&gt;&amp;gt; its care unit and then comparing the patient with the beds of that &amp;nbsp;
&lt;br&gt;&amp;gt; care
&lt;br&gt;&amp;gt; unit. &amp;nbsp;That would take 1000*100 tests to match patients to care units
&lt;br&gt;&amp;gt; and then 1000*20 tests to find the right bed. &amp;nbsp;That is 120'000 instead
&lt;br&gt;&amp;gt; of 2'000'000 comparisons.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So I would write something like this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (defrule ...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;(care-unit (id ?u))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;(bed (id ?b) (unit ?u))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;(patient (id ?p) (unit ?u) (bed ?b))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;(not (the patient is attached to the bed))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;=&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;(attach the patient to the bed)
&lt;br&gt;&amp;gt; )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; but will it work? &amp;nbsp;Will the matching of patients to care units be
&lt;br&gt;&amp;gt; factored out and then compared only to the beds matching the care &amp;nbsp;
&lt;br&gt;&amp;gt; unit,
&lt;br&gt;&amp;gt; or will each patient be checked against each of the 20000 &amp;nbsp;
&lt;br&gt;&amp;gt; intermediates
&lt;br&gt;&amp;gt; results of the first 2 lines?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Best regards,
&lt;br&gt;&amp;gt; Florian Fischer
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, send the words 'unsubscribe jess-users &amp;nbsp;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237827&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;&amp;gt; in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237827&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;&amp;gt; (use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237827&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; .
&lt;br&gt;&amp;gt; --------------------------------------------------------------------
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------
&lt;br&gt;Ernest Friedman-Hill
&lt;br&gt;Informatics &amp; Decision Sciences, Sandia National Laboratories
&lt;br&gt;PO Box 969, MS 9012, Livermore, CA 94550
&lt;br&gt;&lt;a href=&quot;http://www.jessrules.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.jessrules.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237827&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237827&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237827&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Installing-Fuzzy-on-Jess-tp18198490p18237827.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18237234</id>
	<title>Re: JESS: A question of optimisation</title>
	<published>2008-07-02T05:51:40Z</published>
	<updated>2008-07-02T05:51:40Z</updated>
	<author>
		<name>Peter Lin</name>
	</author>
	<content type="html">the example confuses me a bit. If I had to do the same thing the rule
&lt;br&gt;might look like this.
&lt;br&gt;&lt;br&gt;(defrule assignBed
&lt;br&gt;&amp;nbsp; &amp;nbsp; ?patient &amp;lt;- (patient
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (id ?p)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (unit ?u)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (bed ?b&amp;:(eq ?b 0) ) ;; if the patient hasn't been assinged.
&lt;br&gt;assuming unassigned is zero
&lt;br&gt;&amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; (care-unit
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (id ?u) ;; join on the patient's assigned care-unit
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (availableBeds ?beds&amp;:(&amp;gt; ?beds 0) ) ;; checks to see if unit
&lt;br&gt;has available bed
&lt;br&gt;&amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; (bed
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (id ?bedid) ;; bind bed id to variable &amp;quot;?bedid&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (unit ?u) ;; join on the care-unit
&lt;br&gt;&amp;nbsp; &amp;nbsp; )
&lt;br&gt;=&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; (modify ?patient (bed ?bedid) )
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;The example in the email wouldn't work, since it would only match
&lt;br&gt;patients that are already assigned to a bed in a care unit. I'm
&lt;br&gt;guessing, you only want to assign beds to patients without an assigned
&lt;br&gt;bed. The first pattern checks to make sure it doesn't try to find a
&lt;br&gt;bed for patient that already has one.
&lt;br&gt;&lt;br&gt;doing it this way, the search space should be considerably smaller.
&lt;br&gt;&lt;br&gt;peter
&lt;br&gt;&lt;br&gt;On Wed, Jul 2, 2008 at 8:44 AM, Florian Fischer
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237234&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;florian.fischer@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have a question about optimizing a query in Jess.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have (let's take round numbers) 100 care units. &amp;nbsp;Each care unit has 20
&lt;br&gt;&amp;gt; beds and on average 10 patients.
&lt;br&gt;&amp;gt; I want to match patients to their beds. &amp;nbsp;A patient has an attribute
&lt;br&gt;&amp;gt; giving its current bed.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I could write something like
&lt;br&gt;&amp;gt; (defrule ...
&lt;br&gt;&amp;gt; &amp;nbsp; (bed (id ?b))
&lt;br&gt;&amp;gt; &amp;nbsp; (patient (id ?p) (bed ?b))
&lt;br&gt;&amp;gt; &amp;nbsp; (not (the patient is attached to the bed))
&lt;br&gt;&amp;gt; &amp;nbsp; =&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; (attach the patient to the bed)
&lt;br&gt;&amp;gt; )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; but then, each patient is compared to each bed, which takes 2 millions
&lt;br&gt;&amp;gt; comparisons. &amp;nbsp;I'd like to optimize that by first matching a patient to
&lt;br&gt;&amp;gt; its care unit and then comparing the patient with the beds of that care
&lt;br&gt;&amp;gt; unit. &amp;nbsp;That would take 1000*100 tests to match patients to care units
&lt;br&gt;&amp;gt; and then 1000*20 tests to find the right bed. &amp;nbsp;That is 120'000 instead
&lt;br&gt;&amp;gt; of 2'000'000 comparisons.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So I would write something like this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (defrule ...
&lt;br&gt;&amp;gt; &amp;nbsp; (care-unit (id ?u))
&lt;br&gt;&amp;gt; &amp;nbsp; (bed (id ?b) (unit ?u))
&lt;br&gt;&amp;gt; &amp;nbsp; (patient (id ?p) (unit ?u) (bed ?b))
&lt;br&gt;&amp;gt; &amp;nbsp; (not (the patient is attached to the bed))
&lt;br&gt;&amp;gt; &amp;nbsp; =&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; (attach the patient to the bed)
&lt;br&gt;&amp;gt; )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; but will it work? &amp;nbsp;Will the matching of patients to care units be
&lt;br&gt;&amp;gt; factored out and then compared only to the beds matching the care unit,
&lt;br&gt;&amp;gt; or will each patient be checked against each of the 20000 intermediates
&lt;br&gt;&amp;gt; results of the first 2 lines?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Best regards,
&lt;br&gt;&amp;gt; Florian Fischer
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237234&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;&amp;gt; in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237234&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;&amp;gt; (use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237234&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; --------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237234&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237234&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18237234&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Installing-Fuzzy-on-Jess-tp18198490p18237234.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18236479</id>
	<title>JESS: A question of optimisation</title>
	<published>2008-07-02T05:34:44Z</published>
	<updated>2008-07-02T05:34:44Z</updated>
	<author>
		<name>Florian Fischer</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;I have a question about optimizing a query in Jess.
&lt;br&gt;&lt;br&gt;I have (let's take round numbers) 100 care units. &amp;nbsp;Each care unit has 20
&lt;br&gt;beds and on average 10 patients.
&lt;br&gt;I want to match patients to their beds. &amp;nbsp;A patient has an attribute
&lt;br&gt;giving its current bed.
&lt;br&gt;&lt;br&gt;I could write something like
&lt;br&gt;(defrule ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; (bed (id ?b))
&lt;br&gt;&amp;nbsp; &amp;nbsp; (patient (id ?p) (bed ?b))
&lt;br&gt;&amp;nbsp; &amp;nbsp; (not (the patient is attached to the bed))
&lt;br&gt;&amp;nbsp; &amp;nbsp; =&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; (attach the patient to the bed)
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;but then, each patient is compared to each bed, which takes 2 millions
&lt;br&gt;comparisons. &amp;nbsp;I'd like to optimize that by first matching a patient to
&lt;br&gt;its care unit and then comparing the patient with the beds of that care
&lt;br&gt;unit. &amp;nbsp;That would take 1000*100 tests to match patients to care units
&lt;br&gt;and then 1000*20 tests to find the right bed. &amp;nbsp;That is 120'000 instead
&lt;br&gt;of 2'000'000 comparisons.
&lt;br&gt;&lt;br&gt;So I would write something like this:
&lt;br&gt;&lt;br&gt;(defrule ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; (care-unit (id ?u))
&lt;br&gt;&amp;nbsp; &amp;nbsp; (bed (id ?b) (unit ?u))
&lt;br&gt;&amp;nbsp; &amp;nbsp; (patient (id ?p) (unit ?u) (bed ?b))
&lt;br&gt;&amp;nbsp; &amp;nbsp; (not (the patient is attached to the bed))
&lt;br&gt;&amp;nbsp; &amp;nbsp; =&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; (attach the patient to the bed)
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;but will it work? &amp;nbsp;Will the matching of patients to care units be
&lt;br&gt;factored out and then compared only to the beds matching the care unit,
&lt;br&gt;or will each patient be checked against each of the 20000 intermediates
&lt;br&gt;results of the first 2 lines?
&lt;br&gt;&lt;br&gt;Best regards,
&lt;br&gt;Florian Fischer
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18236479&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18236479&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18236479&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Installing-Fuzzy-on-Jess-tp18198490p18236479.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18235861</id>
	<title>JESS: The retracted fact can still fire rule</title>
	<published>2008-07-01T22:45:30Z</published>
	<updated>2008-07-01T22:45:30Z</updated>
	<author>
		<name>Chen, Yixi</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 3.2//EN&quot;&gt;
&lt;HTML&gt;
&lt;HEAD&gt;
&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;META NAME=&quot;Generator&quot; CONTENT=&quot;MS Exchange Server version 6.5.7652.24&quot;&gt;
&lt;TITLE&gt;The retracted fact can still fire rule&lt;/TITLE&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;
&lt;!-- Converted from text/rtf format --&gt;

&lt;P&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;Dear all,&lt;/FONT&gt; 

&lt;BR&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;I found a retracted fact can still fire other rules, it is really strange. From the log, fact f-2 was retracted. But rule '&lt;/FONT&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;retract_B&lt;B&gt; f-2&lt;/B&gt;, f-3, f-1&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;' still fire.&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;I did more testing, and found this may be caused by template containing multislot and declared as 'slot-specific'. I mark two line code as 'place 1' and 'place 2'. If comment the code either in 'place 1' or 'place 2', the rule can fire correctly. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;Does this bug occur when a template declared as 'slot-specific', and its multi-slot appear on the LHS of a rule? My Jess version is&lt;/FONT&gt; &lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;7.0 11/1/2006&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;.&lt;/FONT&gt; &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;Thanks&lt;/FONT&gt;&lt;/SPAN&gt;
&lt;/P&gt;

&lt;P&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;=====================Log Start====================&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;Jess, the Rule Engine for the Java Platform&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;Copyright (C) 2006 Sandia Corporation&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;Jess Version 7.0 11/1/2006&lt;/FONT&gt;&lt;/SPAN&gt;
&lt;/P&gt;

&lt;P&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;&amp;nbsp;==&amp;gt; f-1 (MAIN::Template_A (has_B &amp;quot;BID&amp;quot;) (names &amp;quot;name1&amp;quot; &amp;quot;name2&amp;quot;) (times 0))&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;&amp;nbsp;==&amp;gt; f-2 (MAIN::Template_B (id &amp;quot;BID&amp;quot;))&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;&amp;nbsp;==&amp;gt; f-3 (MAIN::Template_C (has_B &amp;quot;BID&amp;quot;) (id &amp;quot;C1&amp;quot;))&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;==&amp;gt; Activation: MAIN::retract_B :&amp;nbsp; f-2, f-3, f-1&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;&amp;nbsp;==&amp;gt; f-4 (MAIN::Template_C (has_B &amp;quot;BID&amp;quot;) (id &amp;quot;C2&amp;quot;))&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;==&amp;gt; Activation: MAIN::retract_B :&amp;nbsp; f-2, f-4, f-1&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;&amp;nbsp;&amp;lt;=&amp;gt; f-1 (MAIN::Template_A (has_B &amp;quot;BID&amp;quot;) (names &amp;quot;name1&amp;quot; &amp;quot;name2&amp;quot;) (times 1))&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;FIRE 1 MAIN::retract_B f-2, f-4, f-1&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;B&gt;&amp;nbsp;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;&amp;lt;== f-2&lt;/FONT&gt;&lt;/B&gt; &lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;(MAIN::Template_B (id &amp;quot;BID&amp;quot;))&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;FIRE 2 MAIN::retract_B&lt;/FONT&gt;&lt;B&gt; &lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;f-2&lt;/FONT&gt;&lt;/B&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;, f-3, f-1&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;&amp;nbsp;&amp;lt;== Focus MAIN&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;====================Log End=======================&lt;/FONT&gt;&lt;/SPAN&gt;
&lt;/P&gt;

&lt;P&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;====================Code Start=====================&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;(deftemplate MAIN::Template_A &lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp; (declare (slot-specific TRUE))&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;B&gt; &lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&lt;/FONT&gt;&lt;B&gt; &lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;place 1&lt;/FONT&gt;&lt;/B&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp; (slot has_B) &lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp; (multislot names)&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp; (slot times))&lt;/FONT&gt;&lt;/SPAN&gt;
&lt;/P&gt;

&lt;P&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;(deftemplate MAIN::Template_B &lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp; (slot id))&lt;/FONT&gt;&lt;/SPAN&gt;
&lt;/P&gt;

&lt;P&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;(deftemplate MAIN::Template_C &lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp; (slot has_B)&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp; (slot id))&lt;/FONT&gt;&lt;/SPAN&gt;
&lt;/P&gt;

&lt;P&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;(defrule retract_B &lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp; ?factB &amp;lt;-(Template_B&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (id ?bid))&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Template_C &lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (has_B ?bid))&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Template_A&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (has_B ?bid)&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (names $?names)&amp;nbsp;&lt;/FONT&gt;&lt;B&gt; &lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;;place 2&lt;/FONT&gt;&lt;/B&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;=&amp;gt;&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;(retract ?factB))&lt;/FONT&gt;&lt;/SPAN&gt;
&lt;/P&gt;

&lt;P&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;(reset)&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;(watch all)&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;(bind ?factA (assert (MAIN::Template_A&amp;nbsp; (has_B &amp;quot;BID&amp;quot;)(names (create$ &amp;quot;name1&amp;quot; &amp;quot;name2&amp;quot;))(times 0))))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;(assert (MAIN::Template_B (id &amp;quot;BID&amp;quot;)))&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;(assert (MAIN::Template_C (id &amp;quot;C1&amp;quot;)(has_B &amp;quot;BID&amp;quot;)))&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;(assert (MAIN::Template_C (id &amp;quot;C2&amp;quot;)(has_B &amp;quot;BID&amp;quot;)))&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;(modify ?factA (times 1))&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;(run)&lt;/FONT&gt;&lt;/SPAN&gt;

&lt;BR&gt;&lt;SPAN LANG=&quot;en-us&quot;&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;====================Code End======================&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN LANG=&quot;zh-cn&quot;&gt;&lt;/SPAN&gt;
&lt;/P&gt;

&lt;/BODY&gt;
&lt;/HTML&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-The-retracted-fact-can-still-fire-rule-tp18235861p18235861.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18226209</id>
	<title>Re: JESS: Modifying a fact from the current activation</title>
	<published>2008-07-01T14:52:28Z</published>
	<updated>2008-07-01T14:52:28Z</updated>
	<author>
		<name>Ernest Friedman-Hill</name>
	</author>
	<content type="html">Hi Alan:
&lt;br&gt;&lt;br&gt;To make a long story short: you need to call getIcon() on the Fact &amp;nbsp;
&lt;br&gt;instances you extract here, and use the new Facts returned by them. As &amp;nbsp;
&lt;br&gt;the Javadoc for getIcon() says
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Return the canonical representation of this Fact object. For most &amp;nbsp;
&lt;br&gt;Facts, this returns &amp;quot;this&amp;quot;, but for certain Facts -- in particular, &amp;nbsp;
&lt;br&gt;for Facts extracted from jess.Token
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;objects -- it may return another object. If you are examining a &amp;nbsp;
&lt;br&gt;jess.Token object and obtain a reference to a Fact from that Token, &amp;nbsp;
&lt;br&gt;then call getIcon() to &amp;quot;canonicalize&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;that Fact before using it.
&lt;br&gt;&lt;br&gt;I should add a note about this issue to the Javadoc for &amp;nbsp;
&lt;br&gt;jess.Token.fact().
&lt;br&gt;&lt;br&gt;For those interested in the underlying explanation: the facts returned &amp;nbsp;
&lt;br&gt;from Token.fact() may -- in the case of a fact with a multifield that &amp;nbsp;
&lt;br&gt;is explicitly matched by the rule -- return not the &amp;quot;actual&amp;quot; fact, but &amp;nbsp;
&lt;br&gt;a sort of &amp;quot;view&amp;quot; of the fact, that describes how the multifield is &amp;nbsp;
&lt;br&gt;matched. The getIcon() method returns the &amp;quot;actual&amp;quot; fact associated &amp;nbsp;
&lt;br&gt;with the view.
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Jul 1, 2008, at 5:04 PM, Greenblatt, Alan wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I have a series of rules which call a Java user function when they &amp;nbsp;
&lt;br&gt;&amp;gt; fire which among other things, sometimes needs to get the list of &amp;nbsp;
&lt;br&gt;&amp;gt; facts which caused the rule to fire and then modify a certain slot &amp;nbsp;
&lt;br&gt;&amp;gt; in those facts.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Perhaps I have a misunderstanding of how the current activation &amp;nbsp;
&lt;br&gt;&amp;gt; works ((engine) getThisAcivation), but I was under the impression &amp;nbsp;
&lt;br&gt;&amp;gt; that if you get the Token from the Activation, you can get at the &amp;nbsp;
&lt;br&gt;&amp;gt; Facts which contributed to the current rule firing.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I've simulated this with the following simple code, which produces &amp;nbsp;
&lt;br&gt;&amp;gt; an exception:
&lt;br&gt;&amp;gt; (deftemplate Class1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (slot A)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (multislot B))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (defrule ModClass1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (Class1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (A ?a)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (B $? ?var1 $?))
&lt;br&gt;&amp;gt; =&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (bind ?token (((engine) getThisActivation) getToken))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (bind ?fact1 (?token fact 0))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (modify ?fact1 (A &amp;quot;123&amp;quot;)))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (reset)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (assert
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (Class1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (A &amp;quot;abc&amp;quot;)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (B &amp;quot;def&amp;quot;)))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (run)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; When run this, I get the following exception: Fact object not in &amp;nbsp;
&lt;br&gt;&amp;gt; working memory (MAIN::Class1 (A &amp;quot;abc&amp;quot;) (B &amp;quot;def&amp;quot; )).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Evidently, this is because ?fact1 is not identical to the Fact &amp;nbsp;
&lt;br&gt;&amp;gt; returned from:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (bind ?fact2 ((engine) findFactByID (?fact1 getFactId)))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It turns out that if I modify ?fact2 instead of ?fact1, I'm good to &amp;nbsp;
&lt;br&gt;&amp;gt; go. &amp;nbsp;Can someone please explain to me what is going on here? &amp;nbsp;Why is &amp;nbsp;
&lt;br&gt;&amp;gt; fact2 different from fact1?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Here's a version of the code from above that works just fine:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (deftemplate Class1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (slot A)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (multislot B))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (defrule ModClass1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (Class1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (A ?a)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (B $? ?var1 $?))
&lt;br&gt;&amp;gt; =&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (bind ?token (((engine) getThisActivation) getToken))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (bind ?fact1 (?token fact 0))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (bind ?fact2 ((engine) findFactByID (?fact1 getFactId)))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (modify ?fact2 (A &amp;quot;123&amp;quot;)))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (reset)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (assert
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (Class1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (A &amp;quot;abc&amp;quot;)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (B &amp;quot;def&amp;quot;)))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (run)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks very much,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Alan
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------
&lt;br&gt;Ernest Friedman-Hill
&lt;br&gt;Informatics &amp; Decision Sciences, Sandia National Laboratories
&lt;br&gt;PO Box 969, MS 9012, Livermore, CA 94550
&lt;br&gt;&lt;a href=&quot;http://www.jessrules.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.jessrules.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18226209&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18226209&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18226209&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Modifying-a-fact-from-the-current-activation-tp18225983p18226209.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18225983</id>
	<title>JESS: Modifying a fact from the current activation</title>
	<published>2008-07-01T14:04:41Z</published>
	<updated>2008-07-01T14:04:41Z</updated>
	<author>
		<name>Greenblatt, Alan</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;
&lt;META http-equiv=Content-Type content=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;META content=&quot;MSHTML 6.00.6000.16674&quot; name=GENERATOR&gt;&lt;/HEAD&gt;
&lt;BODY&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;I have a series 
of&amp;nbsp;rules which call a Java user function when they fire which among other 
things, sometimes needs to get the list of facts which caused the rule to fire 
and then modify&amp;nbsp;a&amp;nbsp;certain slot in 
those&amp;nbsp;facts.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Perhaps I have a misunderstanding of how the current activation works 
((engine) getThisAcivation), but I was under the impression that if you get the 
Token from the Activation, you can get at the&amp;nbsp;Facts which contributed to 
the current rule firing.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;I've simulated this 
with the following simple&amp;nbsp;code, which produces an exception: 
&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;BLOCKQUOTE dir=ltr style=&quot;MARGIN-RIGHT: 0px&quot;&gt;
  &lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;
  &lt;P align=left&gt;&lt;FONT size=2&gt;(deftemplate&lt;/FONT&gt;&lt;FONT size=2&gt; Class1&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(slot A)&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(multislot 
  B))&lt;BR&gt;&lt;BR&gt;(defrule&lt;/FONT&gt;&lt;FONT size=2&gt; ModClass1&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;Class1&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(A 
  ?a)&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(B 
  $? ?var1 $?))&lt;BR&gt;=&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt;&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(bind ?token (((engine) 
  getThisActivation) getToken))&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(bind ?fact&lt;SPAN class=337374120-01072008&gt;1&lt;/SPAN&gt; (?token fact 0))&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(modify ?fact&lt;SPAN class=337374120-01072008&gt;1&lt;/SPAN&gt; (A &quot;123&quot;))&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;SPAN class=337374120-01072008&gt;)&lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;(reset)&lt;BR&gt;&lt;BR&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;assert&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
  &lt;/SPAN&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;Class1&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(A 
  &quot;abc&quot;)&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(B 
  &quot;def&quot;)))&lt;BR&gt;&lt;BR&gt;(run)&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;When run this, I get 
the following exception: &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;&lt;FONT size=2&gt;Fact object not in working memory (MAIN::Class1 
(A &quot;abc&quot;) (B &quot;def&quot; )).&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;Evidently, this is 
because&amp;nbsp;?fact1 is not identical to the Fact returned 
from:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;FONT face=Arial size=2&gt;(bind ?fact2 ((engine) findFactByID (?fact1 
getFactId)))&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;It turns out that if 
I modify ?fact2 instead of ?fact1, I'm good to go.&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;Can someone please explain to 
me what is going on here?&amp;nbsp; Why is fact2 different from 
fact1?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;Here's a version of 
the code from above that works just fine:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;BLOCKQUOTE dir=ltr style=&quot;MARGIN-RIGHT: 0px&quot;&gt;
  &lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;
  &lt;P align=left&gt;&lt;FONT face=Arial size=2&gt;(deftemplate&lt;/FONT&gt;&lt;FONT face=Arial size=2&gt; Class1&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
  &lt;/SPAN&gt;(slot A)&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
  &lt;/SPAN&gt;(multislot B))&lt;BR&gt;&lt;BR&gt;(defrule&lt;/FONT&gt;&lt;FONT face=Arial size=2&gt; 
  ModClass1&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
  &lt;/SPAN&gt;(&lt;/FONT&gt;&lt;FONT face=Arial size=2&gt;Class1&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(A 
  ?a)&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(B 
  $? ?var1 $?))&lt;BR&gt;=&lt;/FONT&gt;&lt;FONT face=Arial&gt;&lt;FONT size=2&gt;&amp;gt;&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(bind ?token (((engine) 
  getThisActivation) getToken))&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(bind ?fact&lt;SPAN class=337374120-01072008&gt;1&lt;/SPAN&gt; (?token fact 0))&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Arial size=2&gt;(bind ?fact2 ((engine) findFactByID (?fact1 
  getFactId)))&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
  &lt;/SPAN&gt;(modify ?fact&lt;SPAN class=337374120-01072008&gt;2&lt;/SPAN&gt; (A 
  &quot;123&quot;))&lt;/FONT&gt;&lt;FONT face=Arial&gt;&lt;FONT size=2&gt;&lt;SPAN class=337374120-01072008&gt;)&lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;(reset)&lt;BR&gt;&lt;BR&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Arial size=2&gt;assert&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
  &lt;/SPAN&gt;(&lt;/FONT&gt;&lt;FONT face=Arial size=2&gt;Class1&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(A 
  &quot;abc&quot;)&lt;BR&gt;&lt;SPAN class=337374120-01072008&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(B 
  &quot;def&quot;)))&lt;BR&gt;&lt;BR&gt;(run)&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;Thanks very 
much,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;Alan&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=337374120-01072008&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Modifying-a-fact-from-the-current-activation-tp18225983p18225983.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18200413</id>
	<title>Re: JESS: Installing Fuzzy on Jess</title>
	<published>2008-06-30T09:38:10Z</published>
	<updated>2008-06-30T09:38:10Z</updated>
	<author>
		<name>DCWYRICK</name>
	</author>
	<content type="html">In eclipse you can right click your project, and go to the &amp;quot;properties&amp;quot;
&lt;br&gt;option. &amp;nbsp;In this list there is a &amp;quot;Java Build Path&amp;quot; section. &amp;nbsp;Click the
&lt;br&gt;libraries tab and add your jar file there. &amp;nbsp;The classpath is just the path
&lt;br&gt;that the java compiler looks at to find class files for your project. &amp;nbsp;You
&lt;br&gt;need to include toolkit jars there, or else the compiler does not know
&lt;br&gt;where to find it.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;Dane C. Wyrick
&lt;br&gt;(402) 544-0872
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;seyed hossein&amp;quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;seyed3000@gmail. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;com&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; To 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Sent by: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18200413&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jess-users@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;owner-jess-users@ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cc 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sandia.gov &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Subject 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;JESS: Installing Fuzzy on Jess &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;06/30/2008 10:45 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AM &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Please respond to &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;jess-users@sandia &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.gov &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Hi,
&lt;br&gt;I'm trying to install Fuzzy on Jess. Following the instructions on the
&lt;br&gt;Installation.html file in the FuzzyToolkit, after extracting the required
&lt;br&gt;files, I tried to &amp;quot;make sure it was included in the CLASSPATH for my
&lt;br&gt;application&amp;quot;, but didn't know much about CLASSPATH related material, so I
&lt;br&gt;simply changed the CLASSPATH Variable Value under System variables of my
&lt;br&gt;computer's Control Panel&amp;gt;System&amp;gt;Advanced&amp;gt;Environment Variables from
&lt;br&gt;.;C:\Program Files\Java\jre... &amp;nbsp; to &amp;nbsp; &amp;nbsp;C:\FuzzyJess\fuzzyJ110a.jar
&lt;br&gt;But like always it failed. Does anyone know how should Fuzzy be installed
&lt;br&gt;on Jess properly?
&lt;br&gt;Thanks in advance,
&lt;br&gt;Seyed
&lt;br&gt;&lt;br&gt;. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;This message and any attachments contain information from Union Pacific which may be confidential and/or privileged.
&lt;br&gt;If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited by law. If you receive this message in error, please contact the sender immediately and delete the message and any attachments.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18200413&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18200413&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18200413&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Installing-Fuzzy-on-Jess-tp18198490p18200413.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18198490</id>
	<title>JESS: Installing Fuzzy on Jess</title>
	<published>2008-06-30T08:37:48Z</published>
	<updated>2008-06-30T08:37:48Z</updated>
	<author>
		<name>seyed hossein</name>
	</author>
	<content type="html">&lt;div&gt;Hi,&lt;/div&gt;
&lt;div&gt;I&amp;#39;m trying to install Fuzzy on Jess. Following the instructions on the Installation.html file in the FuzzyToolkit, after extracting the required files,&amp;nbsp;I tried to &amp;quot;make sure it&amp;nbsp;was included in the CLASSPATH for&amp;nbsp;my application&amp;quot;, but didn&amp;#39;t know&amp;nbsp;much about&amp;nbsp;CLASSPATH related material, so I simply changed the CLASSPATH Variable Value under System variables of my computer&amp;#39;s Control Panel&amp;gt;System&amp;gt;Advanced&amp;gt;Environment Variables from .;C:\Program Files\Java\jre...&amp;nbsp;&amp;nbsp; to&amp;nbsp;&amp;nbsp; &amp;nbsp;C:\FuzzyJess\fuzzyJ110a.jar&lt;/div&gt;

&lt;div&gt;But&amp;nbsp;like always it failed.&amp;nbsp;Does anyone know&amp;nbsp;how should Fuzzy be installed on Jess properly?&lt;/div&gt;
&lt;div&gt;Thanks in advance,&lt;/div&gt;
&lt;div&gt;Seyed&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Installing-Fuzzy-on-Jess-tp18198490p18198490.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18138059</id>
	<title>Re: JESS: installing JessDE</title>
	<published>2008-06-26T08:19:20Z</published>
	<updated>2008-06-26T08:19:20Z</updated>
	<author>
		<name>seyed hossein</name>
	</author>
	<content type="html">&lt;div&gt;Thanks a lot for the replies, it really helped&lt;/div&gt;
&lt;div&gt;For anyone trying to run Jess on &amp;quot;Eclipse IDE for Java EE Developers&amp;quot;, here is what you need to do: on Eclipse go to help&amp;gt;Software Updates&amp;gt;Available Software. Then&amp;nbsp;check every item in the list related to plugins, SDK, etc. and click Install. Then&amp;nbsp;exit Eclipse and&amp;nbsp;copy all 5 of the *.zip files under Jess/eclipse, and&amp;nbsp;paste&amp;nbsp;them in your Eclipse directory. Extract them&amp;nbsp;and run eclipse. On Eclipse&amp;nbsp;check out Help&amp;gt;About Eclipse SDK, to see if&amp;nbsp;Jess logo is there.&lt;br&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Seyed&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;gmail_quote&quot;&gt;On 6/25/08, &lt;b class=&quot;gmail_sendername&quot;&gt;Jason Morris&lt;/b&gt; &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18138059&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jason.c.morris@...&lt;/a&gt;&amp;gt; wrote:&lt;/span&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid&quot;&gt;Hi Seyed,&lt;span class=&quot;q&quot;&gt;&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;It&amp;#39;s been more than a month for me trying frustaingly to install the&lt;br&gt;
&amp;gt;&amp;gt;JessDE on Eclipse but they all failed. &lt;br&gt;&lt;br&gt;&lt;/span&gt;Hers is another thing that you may want to try:&lt;br&gt;&lt;br&gt;You said that you installed Eclipse to the Windows Desktop.&amp;nbsp; Typically, the DOS path to the desktop looks like:&lt;br&gt;
&lt;br&gt;&lt;span style=&quot;FONT-FAMILY: courier new,monospace&quot;&gt;C:\Documents and Settings\(username)\Desktop&lt;/span&gt;&lt;br&gt;&lt;br&gt;Now, historically there have been issues with running Eclipse from a directory which has spaces in its full path, especially its plugins.&amp;nbsp; See &lt;a href=&quot;http://dev.eclipse.org/newslists/news.eclipse.technology.imp/msg00089.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://dev.eclipse.org/newslists/news.eclipse.technology.imp/msg00089.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;For that reason, you might want to install Eclipse to &lt;span style=&quot;FONT-FAMILY: courier new,monospace&quot;&gt;C:\&lt;/span&gt; or &lt;span style=&quot;FONT-FAMILY: courier new,monospace&quot;&gt;C:\Programs&lt;/span&gt; (but not &lt;span style=&quot;FONT-FAMILY: courier new,monospace&quot;&gt;C:\Program Files&lt;/span&gt; where program code would normally go).&amp;nbsp; In any case, it&amp;#39;s probably not a good idea to install application code to your desktop for Windows security reasons.&amp;nbsp; The Documents and Settings folder is a high priority target of many viruses, and it&amp;#39;s usually public so that apps can access it.&amp;nbsp; For example, you can see that cookies get written there.&lt;br&gt;
&lt;br&gt;Hope this helps, too!&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;Jason
&lt;div&gt;&lt;span class=&quot;e&quot; id=&quot;q_11ac17126fccd248_3&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Jun 25, 2008 at 2:59 PM, Gary Napier &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18138059&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gnapier@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;

&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid&quot;&gt;Hi Seyed,&lt;br&gt;&lt;br&gt;I&amp;#39;ve personally not tried JESS in 3.4 yet. (it get&amp;#39;s officially released&lt;br&gt;
today), however i wouldn&amp;#39;t expect any major problems due to backward&lt;br&gt;compatibility.&lt;br&gt;&lt;br&gt;Please could you go into help-&amp;gt;software updates -&amp;gt; manage configuration.&lt;br&gt;&lt;br&gt;You should have 3 buttons, that show various groups in the tree below.&lt;br&gt;
Make sure all three are on, especially the 3rd one, show disabled features.&lt;br&gt;&lt;br&gt;Now navigate the tree and see if you can find any reference to JESS. If&lt;br&gt;it is there, check what issues jess has and report them to us for&lt;br&gt;
further advice,&lt;br&gt;&lt;br&gt;If you have no JESS entries, then the problem rests with where the&lt;br&gt;plugins and features are put on your system. Close eclipse&lt;br&gt;The base directory is eclipse (from what you have said, Desktop/Eclipse)&lt;br&gt;
and should contain a plugins and features directory as well as the&lt;br&gt;eclipse binary.&lt;br&gt;The jess download has a folder called eclipse, and in that there are 5&lt;br&gt;zip files. If you extract these 5 zip files to the one directory (say&lt;br&gt;
c:\temp\jess) you should find 2 folders.&lt;br&gt;These two folders are plugins and features. Copy both folders to your&lt;br&gt;eclipse directory (overwrite is ok, as it will merge old folders with new)&lt;br&gt;Now run eclipse, and follow the same checks for the features...&lt;br&gt;
(remember to clean up your temp directory afterwards)&lt;br&gt;&lt;br&gt;Hope that helps.&lt;br&gt;Gary
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;seyed hossein wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid&quot;&gt;Hi&lt;br&gt;It&amp;#39;s been more than a month for me trying frustaingly to install the&lt;br&gt;JessDE on Eclipse but they all failed. To install JessDE, I&amp;#39;ve&lt;br&gt;
downloaded both the &amp;quot;Eclipse Classic 3.4&amp;quot; and the &amp;quot;Eclipse IDE for&lt;br&gt;Java EE Developers&amp;quot; from the Eclipse website, then saved them both on&lt;br&gt;my desktop, installed and ran Eclipse. After exitting Eclipse, for&lt;br&gt;
each Eclipse version, I coppied all the files from Jess70/eclipse and&lt;br&gt;pasted in my Desktop/eclipse file, then extracted them. When I checked&lt;br&gt;the Desktop/eclipse/plugins, but the &amp;quot;gov.sandia.jess_7.0.0&amp;quot; did not&lt;br&gt;
appear, nor did any of the other gov.sandia... files exist under their&lt;br&gt;corresponding directories. Therefore, no such Jess logo appeared in&lt;br&gt;the Eclipse&amp;gt;Help&amp;gt;About Eclipse Platform. I even tried transferring the&lt;br&gt;
Jess files to their Eclipse directories manually but they still didn&amp;#39;t&lt;br&gt;show up in the Plugin Details under Eclipse&amp;gt;Help&amp;gt;About Eclipse Platform.&lt;br&gt;Could anyone tell me where I&amp;#39;m wrong.&lt;br&gt;Where is the &amp;quot;top-level Eclipse installation directory&amp;quot; meant to be?&lt;br&gt;
Is extracting a file equavalent to unzipping a file (&amp;quot;unzip&amp;quot; was not&lt;br&gt;an option for the files, only &amp;quot;extract&amp;quot; was there)?&lt;br&gt;Once Jess does function in Eclipse, how do we open/create a *.clp file&lt;br&gt;
in it?&lt;br&gt;Thank you&lt;br&gt;&lt;/blockquote&gt;&lt;br&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;--&lt;br&gt;_____________________________________________________________________________&lt;br&gt;Gary Napier&lt;br&gt;Alpha Lab&lt;br&gt;Institute for Energy and Environment&lt;br&gt;Department of Electronic and Electrical Engineering&lt;br&gt;
University of Strathclyde Royal College Building&lt;br&gt;204 George Street&lt;br&gt;Glasgow&lt;br&gt;G1 1XW&lt;br&gt;&lt;br&gt;e: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18138059&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gnapier@...&lt;/a&gt;&lt;br&gt;
&lt;br&gt;t: 0141 548 2665&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------&lt;br&gt;To unsubscribe, send the words &amp;#39;unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18138059&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;&amp;#39;&lt;br&gt;
in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18138059&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18138059&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.&lt;br&gt;
--------------------------------------------------------------------&lt;br&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;sg&quot;&gt;-- &lt;br&gt;-----------------------------------------------------------&lt;br&gt;Jason Morris&lt;br&gt;
Morris Technical Solutions LLC&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18138059&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;consulting@...&lt;/a&gt;&lt;br&gt;(517) 304-5883 &lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-installing-JessDE-tp18119169p18138059.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18136008</id>
	<title>Re: JESS: Maintaining session in JESS</title>
	<published>2008-06-26T07:57:10Z</published>
	<updated>2008-06-26T07:57:10Z</updated>
	<author>
		<name>Ernest Friedman-Hill</name>
	</author>
	<content type="html">&lt;br&gt;On Jun 25, 2008, at 12:02 PM, Deepak Pol wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Please make me clear on this because in this what I meant was &amp;nbsp;
&lt;br&gt;&amp;gt; 'total' will be the supplied input to engine and that will vary in &amp;nbsp;
&lt;br&gt;&amp;gt; my application for each client. Though as a rule I always want each &amp;nbsp;
&lt;br&gt;&amp;gt; client's total to be compared to 100 to decide the rule execution. &amp;nbsp;
&lt;br&gt;&amp;gt; Thats why I kept 100 as hard coded value while total as the value &amp;nbsp;
&lt;br&gt;&amp;gt; dynamically coming from the client.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Though 'peering' concept should solve my problems. I reckon a global &amp;nbsp;
&lt;br&gt;&amp;gt; variable created with a peer has a scope 'peer', right?. Can you &amp;nbsp;
&lt;br&gt;&amp;gt; specify the tentative date when 7.1 will be out? Because I am about &amp;nbsp;
&lt;br&gt;&amp;gt; to begin on a project where I want to replace my application &amp;nbsp;
&lt;br&gt;&amp;gt; framework with JESS. And the peering is the concept I need the most.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;Global variable themselves exist for all peers, while the values are &amp;nbsp;
&lt;br&gt;specific to each peer, which is just what you want. But you don't want &amp;nbsp;
&lt;br&gt;to use global variables anyway; use working memory elements (facts) &amp;nbsp;
&lt;br&gt;instead.
&lt;br&gt;&lt;br&gt;Unless there's a major issue reported in the next few days, Jess 7.1 &amp;nbsp;
&lt;br&gt;final should be released next week.
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; How to express &amp;quot;when all the rules in this module have fired, &amp;nbsp;
&lt;br&gt;&amp;gt; proceed to module 2&amp;quot;?
&lt;br&gt;&lt;br&gt;&lt;br&gt;You just have to make sure that the top two entries on the focus stack &amp;nbsp;
&lt;br&gt;are module 1 and module 2, in that order.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Following is what I am planning to do:
&lt;br&gt;&amp;gt; Condition: module_1 should always fire, if any(Note this 'any') rule &amp;nbsp;
&lt;br&gt;&amp;gt; in module 2 fires module_3 should fire else module_4 should fire.
&lt;br&gt;&lt;br&gt;&lt;br&gt;There's no specific built-in way to do this kind of thing, but I can &amp;nbsp;
&lt;br&gt;think of a few ways to accomplish it. For example, you could use the &amp;nbsp;
&lt;br&gt;JessListener event notification API to watch for rule firing; if a &amp;nbsp;
&lt;br&gt;rule in module 2 fires, then module4 could be removed from the focus &amp;nbsp;
&lt;br&gt;stack and module 3 pushed on. It doesn't sound particularly elegant, &amp;nbsp;
&lt;br&gt;but it would work.
&lt;br&gt;&lt;br&gt;But you can consider other ways to structure the whole application. &amp;nbsp;
&lt;br&gt;For example, you can use a &amp;quot;control fact&amp;quot; to signal what group of &amp;nbsp;
&lt;br&gt;rules should fire first, and the rules in module 2 can modify the &amp;nbsp;
&lt;br&gt;control fact. The rules you're calling module 3 and module 4 could &amp;nbsp;
&lt;br&gt;simply match a particular state of the control fact.
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;gt; So currenlty I am thinking about an approach of having a global &amp;nbsp;
&lt;br&gt;&amp;gt; variable ?*module_2_fired* and a condition
&lt;br&gt;&amp;gt; if ?*module_2_fired* then focus module_3 else focus module_4
&lt;br&gt;&lt;br&gt;Yes, you can do things like that. Event listeners can help streamline &amp;nbsp;
&lt;br&gt;this sort of thing by watching for particular rule firings.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 3. I want to have some modules (which would be set of rules) which &amp;nbsp;
&lt;br&gt;&amp;gt; are exclusive i.e. only one of them should fire even if others also &amp;nbsp;
&lt;br&gt;&amp;gt; match. ...
&lt;br&gt;&amp;gt; Since the conditions in my case are provided by user and not created &amp;nbsp;
&lt;br&gt;&amp;gt; by me, I cannot change them. So even if I asert fact region after &amp;nbsp;
&lt;br&gt;&amp;gt; once fired, I can't change rule_a2 to look for absence of fact &amp;nbsp;
&lt;br&gt;&amp;gt; region it has to be fired with the same condion. Is there any way to &amp;nbsp;
&lt;br&gt;&amp;gt; do this? Will return in last rule work?
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;Again, I think using event listeners and manually messing with the &amp;nbsp;
&lt;br&gt;focus stack is going to be the only way to achieve this, given that &amp;nbsp;
&lt;br&gt;you can't implement any of it in rules.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------
&lt;br&gt;Ernest Friedman-Hill
&lt;br&gt;Informatics &amp; Decision Sciences, Sandia National Laboratories
&lt;br&gt;PO Box 969, MS 9012, Livermore, CA 94550
&lt;br&gt;&lt;a href=&quot;http://www.jessrules.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.jessrules.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136008&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136008&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136008&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Maintaining-session-in-JESS-tp18097618p18136008.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18135448</id>
	<title>Re: JESS: Documentation bug for template properties</title>
	<published>2008-06-26T07:34:45Z</published>
	<updated>2008-06-26T07:34:45Z</updated>
	<author>
		<name>Ernest Friedman-Hill</name>
	</author>
	<content type="html">Thanks. Section 5.1 was inadvertently not updated, while 17.7 was. &amp;nbsp;
&lt;br&gt;Fixed for the final release.
&lt;br&gt;&lt;br&gt;If you find any more, let us know!
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Jun 26, 2008, at 6:25 AM, Henrique Lopes Cardoso wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In the change history for 7.1RC1: &amp;quot;Template properties
&lt;br&gt;&amp;gt; (backchain-reactive, slot-specific) are inherited.&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In section 5.1 of the manual: &amp;quot;A template inherits all the slots of &amp;nbsp;
&lt;br&gt;&amp;gt; its
&lt;br&gt;&amp;gt; parent template, but none of its other characteristics.&amp;quot;
&lt;br&gt;&amp;gt; And in section 17.7: &amp;quot;The backchain-reactive and slot-specific
&lt;br&gt;&amp;gt; declarations are inherited by child templates.&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Could this be clarified?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Henrique
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------
&lt;br&gt;Ernest Friedman-Hill
&lt;br&gt;Informatics &amp; Decision Sciences, Sandia National Laboratories
&lt;br&gt;PO Box 969, MS 9012, Livermore, CA 94550
&lt;br&gt;&lt;a href=&quot;http://www.jessrules.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.jessrules.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18135448&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18135448&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18135448&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Documentation-bug-for-template-properties-tp18135115p18135448.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18135115</id>
	<title>JESS: Documentation bug for template properties</title>
	<published>2008-06-26T03:25:56Z</published>
	<updated>2008-06-26T03:25:56Z</updated>
	<author>
		<name>Henrique Lopes Cardoso</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;In the change history for 7.1RC1: &amp;quot;Template properties
&lt;br&gt;(backchain-reactive, slot-specific) are inherited.&amp;quot;
&lt;br&gt;&lt;br&gt;In section 5.1 of the manual: &amp;quot;A template inherits all the slots of its
&lt;br&gt;parent template, but none of its other characteristics.&amp;quot;
&lt;br&gt;And in section 17.7: &amp;quot;The backchain-reactive and slot-specific
&lt;br&gt;declarations are inherited by child templates.&amp;quot;
&lt;br&gt;&lt;br&gt;Could this be clarified?
&lt;br&gt;&lt;br&gt;Henrique
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;To unsubscribe, send the words 'unsubscribe jess-users &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18135115&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;you@...&lt;/a&gt;'
&lt;br&gt;in the BODY of a message to &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18135115&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;majordomo@...&lt;/a&gt;, NOT to the list
&lt;br&gt;(use your own address!) List problems? Notify &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18135115&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;owner-jess-users@...&lt;/a&gt;.
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/JESS%3A-Documentation-bug-for-template-properties-tp18135115p18135115.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18121280</id>
	<title>Re: JESS: installing JessDE</title>
	<published>2008-06-25T13:28:49Z</published>
	<updated>2008-06-25T13:28:49Z</updated>
	<author>
		<name>Jason Morris</name>
	</author>
	<content type="html">Hi Seyed,&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;It&amp;#39;s been more than a month for me trying frustaingly to install the&lt;br&gt;&amp;gt;&amp;gt;JessDE on Eclipse but they all failed. &lt;br&gt;&lt;br&gt;Hers is another thing that you may want to try:&lt;br&gt;&lt;br&gt;You said that you installed Eclipse to the Windows Desktop.&amp;nbsp; Typically, the DOS path to the desktop looks like:&lt;br&gt;
&lt;br&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;C:\Documents and Settings\(username)\Desktop&lt;/span&gt;&lt;br&gt;&lt;br&gt;Now, historically there have been issues with running Eclipse from a directory which has spaces in its full path, especially its plugins.&amp;nbsp; See &lt;a href=&quot;http://dev.eclipse.org/newslists/news.eclipse.technology.imp/msg00089.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://dev.eclipse.org/newslists/news.eclipse.technology.imp/msg00089.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;For that reason, you might want to install Eclipse to &lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;C:\&lt;/span&gt; or &lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;C:\Programs&lt;/span&gt; (but not &lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;C:\Program Files&lt;/span&gt; where program code would normally go).&amp;nbsp; In any case, it&amp;#39;s probably not a good idea to install application code to your desktop for Windows security reasons.&amp;nbsp; The Documents and Settings folder is a high priority target of many viruses, and it&amp;#39;s usually public so that apps can access it.&amp;nbsp; For example, yo