I notice that the JPAWorkingMemoryDbLogger class currently uses the command scoped entity manager to persist its data. Which is shared with the engine to perform its work (Command scope), causing to loose this data in case of a rollback. I'm just thinking that it might be useful if it runs on a separate transaction/entity manager, to keep track about everything that happened. For example, if a WorkItemHandler throws an exception, we still know that the respective node was triggered.
Do you guys see any drawback on doing it?
In fact this behavior is exactly what is done by the WorkingMemoryDbLogger but using Hibernate API.
If someone else think that it's useful to be in the API, I can work to provide a patch.