<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><font class="Apple-style-span" face="arial" size="2">I am using the knowledge session to get the objects created.&nbsp;</font><div style="font-family: arial; font-size: 10pt; "><br></div><div><font class="Apple-style-span" face="arial" size="2">knowledgeSession.getObjects():&nbsp;</font></div><div><font class="Apple-style-span" face="arial" size="2"><br></font></div><div><font class="Apple-style-span" 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 class="Apple-style-span" face="arial" size="2"><br></font></div><div><font class="Apple-style-span" face="arial" size="2">Also you can use getQueryResults, or&nbsp;openLiveQuery for the working memory to retrieve facts from the working
 memory.&nbsp;</font></div><div><font class="Apple-style-span" face="arial" size="2"><br></font></div><div><font class="Apple-style-span" face="arial" size="2"><br></font></div><div><font class="Apple-style-span" face="arial" size="2"><br></font></div><div><font class="Apple-style-span" face="arial" size="2"><br></font></div><div><font class="Apple-style-span" face="arial" size="2"><br></font></div><div><font class="Apple-style-span" face="arial" size="2">--- On </font><b style="font-family: arial; font-size: 10pt; ">Fri, 1/28/11, Benson Fung <i>&lt;benson.redhat@gmail.com&gt;</i></b><font class="Apple-style-span" face="arial" size="2"> wrote:</font><br><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; font-family: arial; font-size: 10pt; "><br>From: Benson Fung &lt;benson.redhat@gmail.com&gt;<br>Subject: [rules-users] How to obtain the object/fact created in the
 rule file?<br>To: "Rules Users List" &lt;rules-users@lists.jboss.org&gt;<br>Date: Friday, January 28, 2011, 12:02 PM<br><br><div class="plainMail">Hi,<br><br>I developed a rule as below:<br><br>&nbsp;&nbsp;&nbsp; rule "Rule1"<br>&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; dialect "mvel"<br>&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Fields( field1 &gt; "100" )<br>&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; then<br>&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FieldResults fact0 = new FieldResults();<br>&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fact0.setField1( "This is Correct!" );<br>&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; insert(fact0 );<br>&nbsp;&nbsp;&nbsp; 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.&nbsp; Please
 advise.<br><br><br>Thanks<br>Benson<br>_______________________________________________<br>rules-users mailing list<br><a ymailto="mailto:rules-users@lists.jboss.org" href="/mc/compose?to=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></div></blockquote></div></td></tr></table><br>