<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>