I've been doing some testing recently with the 5.1 snapshot of Drools (build 3280). The JPA state persistence in Drools Flow appears to be much more solid (no more NullPointerExceptions) - many thanks for this.

One question I still have though is with the loading of existing sessions from the database; the loadStatefulKnowledgeSession method of class JPAKnowledgeServiceProviderImpl ultimately creates an instance of CommandBasedStatefulKnowledgeSession to encapsulate the session state. However, this class uses an anonymous local class for its work item manager. I would have expected JPAWorkItemManager to have been used instead, so that all the existing work items are also read back into memory from the database. Or am I missing something? As it is, I have to explicitly use an EntityManager to do this.