<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Charles,<div><br></div><div>just pushed the fix and test case for that issue. Now it should work smoothly to register listeners via spring xml.</div><div><br></div><div>Maciej<br><div><div>On 20 maj 2014, at 16:16, Charles Moulliard <<a href="mailto:ch007m@gmail.com">ch007m@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi,<div><br></div><div><p class="">I have enable AuditLogger using AuditLoggerFactory method (newJPAInstance(Environment env) for a project running on karaf. </p><p class=""> <kie:kmodule id="kModule"></p><p class=""> <kie:kbase name="kPersistence"></p><p class=""> <kie:ksession name="kSession"></p><p class=""> <kie:processEventListener ref="log-listener"/></p><p class=""> <kie:processEventListener ref="mock-process-listener"/></p><p class=""> <kie:configuration></p><p class=""> <kie:jpa-persistence></p><p class=""> <kie:transaction-manager ref="txManager"/></p><p class="">
<kie:entity-manager-factory ref="myEmf"/></p><p class=""> </kie:jpa-persistence></p><p class=""> </kie:configuration></p><p class=""> </kie:ksession></p><p class=""> </kie:kbase></p><p class=""> </kie:kmodule></p><p class=""><br></p><p class=""> <kie:environment id="env"></p><p class=""> <kie:entity-manager-factory ref="myEmf"/></p><p class=""> <kie:transaction-manager ref="txManager"/></p><p class=""> </kie:environment></p><p class=""> <bean id="mock-process-listener" class="org.jbpm.osgi.example.MockProcessEventListener"/></p><p class=""> <bean id="log-listener" class="org.jbpm.process.audit.AuditLoggerFactory" factory-method="newJPAInstance"><br></p><p class=""> <constructor-arg ref="env"/></p><p class=""> </bean></p><p class=""><br></p><p class="">The method of AuditLoggerFactory is well called (debug mode) </p><p class="">public static AbstractAuditLogger newJPAInstance(Environment env) {</p><p class="">
return new JPAWorkingMemoryDbLogger(env);</p><p class=""> }</p><p class=""><br></p><p class="">but the DB (H2) and this table sessionInfo contains a record when the process is started and finished. </p><p class="">
No nodes info recorded and the method beforeNodeTriggered and afterNodeLeft are not called in the class JPAWorkingMemoryDbLogger (debugging) like also in a Mock class implementing the listener</p><p class="">public static AbstractAuditLogger newJPAInstance(Environment env) {</p><p class=""> return new JPAWorkingMemoryDbLogger(env);</p><p class=""> }</p><p class=""><br></p><p class="">public class MockProcessEventListener implements ProcessEventListener {</p><p class=""> public void beforeProcessStarted(ProcessStartedEvent processStartedEvent) {</p><p class=""> System.out.println("MockProcessEventListener :: beforeProcessStarted");</p><p class=""> }</p><p class=""><br></p><p class="">Where can I investigate to verify that listener is working ?</p><p class="">Regards,</p><div>-- <br><div dir="ltr"><div>Charles Moulliard</div><div>Apache Committer / Architect @RedHat</div><div>Twitter : @cmoulliard | Blog : <a href="http://cmoulliard.github.io/" target="_blank"> http://cmoulliard.github.io</a></div>
<div><br></div></div>
</div></div></div>
_______________________________________________<br>jbpm-dev mailing list<br><a href="mailto:jbpm-dev@lists.jboss.org">jbpm-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/jbpm-dev</blockquote></div><br></div></body></html>