[rules-users] viewing working memory

Michael Anstis michael.anstis at gmail.com
Tue May 24 03:56:00 EDT 2011


There is indeed such a Factory!

StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
KnowledgeRuntimeLogger logger =
KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, "test");

You should close the (Threaded)FileLogger after use to ensure its internal
state is persisted to file.

With kind regards,

Mike

2011/5/24 Hezi Stern <hezis at delegatecom.com>

> No I haven’t used the WorkingMemoryFileLogger (was not aware if it), thanks
> for pointing this out.
>
>
>
> Is there any documentation or code example on how to create one? Is there a
> factory that needs to be used (e.g. KnowledgeRuntimeLoggerFactory)?
>
>
>
> Hezi
>
>
>
> *From:* rules-users-bounces at lists.jboss.org [mailto:
> rules-users-bounces at lists.jboss.org] *On Behalf Of *Michael Anstis
> *Sent:* Monday, May 23, 2011 10:10 PM
> *To:* Rules Users List
> *Subject:* Re: [rules-users] viewing working memory
>
>
>
> If you're debugging at break points in Eclipse you'll need to use the
> ThreadedWorkingMemoryFileLogger to ensure the file is written to whilst
> the main thread is paused.
>
> 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.
>
> 2011/5/23 Leonardo Gomes <leonardo.f.gomes at gmail.com>
>
> The audit works fine for me with stateless sessions. Did you tried the WorkingMemoryFileLogger
> ?
>
>
>
> Leo.
>
>
>
> 2011/5/23 Hezi Stern <hezis at delegatecom.com>
>
> I am working with stateless session (Drools 5.1.1) and I wish to view the
> objects in the working memory (debug purposes)
>
> 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” ).
>
>
>
> How can I view in breakpoint (or print in runtime) the working memory?
>
>
>
> Regards,
>
> Hezi
>
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110524/69491e02/attachment.html 


More information about the rules-users mailing list