There is indeed such a Factory!<br><br>StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();<br>KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, &quot;test&quot;);<br>
<br>You should close the (Threaded)FileLogger after use to ensure its internal state is persisted to file.<br><br>With kind regards,<br><br>Mike<br><br><div class="gmail_quote">2011/5/24 Hezi Stern <span dir="ltr">&lt;<a href="mailto:hezis@delegatecom.com">hezis@delegatecom.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">No I haven’t used the WorkingMemoryFileLogger (was not aware if it), thanks for pointing this out.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Is there any documentation or code example on how to create one? Is there a factory that needs to be used (e.g. KnowledgeRuntimeLoggerFactory)?</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Hezi </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> <a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>] <b>On Behalf Of </b>Michael Anstis<br>
<b>Sent:</b> Monday, May 23, 2011 10:10 PM<br><b>To:</b> Rules Users List<br><b>Subject:</b> Re: [rules-users] viewing working memory</span></p><div><div></div><div class="h5"><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-bottom: 12pt;">
If you&#39;re debugging at break points in Eclipse you&#39;ll need to use the <span style="font-family: &quot;Courier New&quot;;">ThreadedWorkingMemoryFileLogger</span> to ensure the file is written to whilst the main thread is paused.<br>
<br>There was a fix to this recently (i.e. 5.2.x) as the resulting file was malformed and could not be read by the Audit View.</p><div><p class="MsoNormal">2011/5/23 Leonardo Gomes &lt;<a href="mailto:leonardo.f.gomes@gmail.com" target="_blank">leonardo.f.gomes@gmail.com</a>&gt;</p>
<p class="MsoNormal">The audit works fine for me with stateless sessions. Did you tried the <span style="font-size: 13.5pt; font-family: &quot;Courier New&quot;;">WorkingMemoryFileLogger ?</span></p><div><p class="MsoNormal">
 </p></div><div><p class="MsoNormal"><span style="font-family: &quot;Courier New&quot;;">Leo.</span></p></div><div><p class="MsoNormal"> </p><div><div><div><p class="MsoNormal">2011/5/23 Hezi Stern &lt;<a href="mailto:hezis@delegatecom.com" target="_blank">hezis@delegatecom.com</a>&gt;</p>
</div></div><blockquote style="border-width: medium medium medium 1pt; border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204); padding: 0in 0in 0in 6pt; margin-left: 4.8pt; margin-right: 0in;">
<div><div><div><div><p class="MsoNormal">I am working with stateless session (Drools 5.1.1) and I wish to view the objects in the working memory (debug purposes)</p><p class="MsoNormal">I understand that in stateless session the audit does not work (not working for me, on breakpoint I get the message “the selected working memory is empty” ).</p>
<p class="MsoNormal"> </p><p class="MsoNormal">How can I view in breakpoint (or print in runtime) the working memory?</p><p class="MsoNormal"> </p><p class="MsoNormal">Regards,</p><p class="MsoNormal">Hezi</p><p class="MsoNormal">
<span style="color: rgb(136, 136, 136);"> </span></p></div></div><p class="MsoNormal"> </p></div></div><p class="MsoNormal" style="margin-bottom: 12pt;">_______________________________________________<br>rules-users mailing list<br>
<a href="mailto: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></p>
</blockquote></div><p class="MsoNormal"> </p></div><p class="MsoNormal" style="margin-bottom: 12pt;"><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto: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></p></div><p class="MsoNormal"> </p></div></div></div></div><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>