A global List object maintains order and can be modified by Java code, none of which is guaranteed with a query, which incidentally adds some overhead to Rete.<br><br>Not knowing what the ultimate purpose and destination of the FieldResults facts is, it is difficult to suggest. Perhaps it isn&#39;t even necessary to insert them as facts?<br>
<br>-W<br><br><br><div class="gmail_quote">2011/1/31 Patricia Bogoevici <span dir="ltr">&lt;<a href="mailto:patriciabogoevici@yahoo.com">patriciabogoevici@yahoo.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
<font face="arial" size="2">I am using the knowledge session to get the objects created. </font><div style="font-family: arial; font-size: 10pt;"><br></div><div><font face="arial" size="2">knowledgeSession.getObjects(): </font></div>
<div><font face="arial" size="2"><br></font></div><div><font face="arial" size="2">this will return all objects: the facts that were inserted into the engine before fireAllRules(), plus the new facts created as result of the rule execution.</font></div>
<div><font face="arial" size="2"><br></font></div><div><font face="arial" size="2">Also you can use getQueryResults, or openLiveQuery for the working memory to retrieve facts from the working
 memory. </font></div><div><font face="arial" size="2"><br></font></div><div><font face="arial" size="2"><br></font></div><div><font face="arial" size="2"><br></font></div><div><font face="arial" size="2"><br></font></div>
<div><font face="arial" size="2"><br></font></div><div><font face="arial" size="2">--- On </font><b style="font-family: arial; font-size: 10pt;">Fri, 1/28/11, Benson Fung <i>&lt;<a href="mailto:benson.redhat@gmail.com" target="_blank">benson.redhat@gmail.com</a>&gt;</i></b><font face="arial" size="2"> wrote:</font><br>
<blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; font-family: arial; font-size: 10pt;"><br>From: Benson Fung &lt;<a href="mailto:benson.redhat@gmail.com" target="_blank">benson.redhat@gmail.com</a>&gt;<br>
Subject: [rules-users] How to obtain the object/fact created in the
 rule file?<br>To: &quot;Rules Users List&quot; &lt;<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>&gt;<br>Date: Friday, January 28, 2011, 12:02 PM<br><br><div>Hi,<br><br>I developed a rule as below:<br>
<br>    rule &quot;Rule1&quot;<br>        dialect &quot;mvel&quot;<br>        when<br>            Fields( field1 &gt; &quot;100&quot; )<br>        then<br>            FieldResults fact0 = new FieldResults();<br>            fact0.setField1( &quot;This is Correct!&quot; );<br>
            insert(fact0 );<br>    end<br><br>After calling fireAllRules(...), the above rule will be fired and<br>created a fact object in the working memory.<br>My problem is how to obtain the FieldResults object in the java<br>
program.  Please
 advise.<br><br><br>Thanks<br>Benson<br>_______________________________________________<br>rules-users mailing list<br><a href="http://mc/compose?to=rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></div></blockquote></div></td></tr></tbody></table><br>







      <br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>