After a discussion on #drools with krisv, I'm opening the following feature request to enable the use of the History Log in JPA.
I would like to be able to use WorkingMemoryDbLogger in a JPA environment. However, org.drools.process.audit.NodeInstanceLog and org.drools.process.audit.ProcessInstanceLog should be annotated with @Entity and relevant annotations to enable out of the box history log with JPA.
I tried a bypass by creating my own version of NodeInstanceLog and ProcessInstanceLog, refering to them in my persistence.xml. The tables get created fine, but I get an exception in WorkingMemoryDbLogger, which makes direct use of the hibernate session:
[main] WARN l.SessionFactoryImpl - JTASessionContext being used with JDBCTransactionFactory; auto-flush will not operate correctly with getCurrentSession()
Hibernate: insert into ProcessInstanceLog (id, processInstanceId, processId, START_DATE, END_DATE) values (null, ?, ?, ?, ?)[main] ERROR tion.JDBCTransaction - Could not toggle autocommit
java.sql.SQLException: autocommit is not allowed on a resource enlisted in a global transaction