Did you try to enable logging for Hibernate to check if Hibernate is issuing queries?
I have similar setup and there are no problems with running history queries. Perhaps you could past a unit test...
thanks very very much for the hint - activating hibernate logging results in two queries being issued against tables JBPM4_HIST_PROCINST and JBPM4_HIST_ACTINST when asking for the process and activity instances.
However, to the best of my understanding, no inserts or updates ever get fired in the course of the execution. It seems I somehow managed to disable history completely . Any hints about how I could possibly have done this?
<history-service /> is in jbpm.default.cfg and I am not sure what else I could be checking...
Bye and TIA,
For the record, I found the issue, largely thanks to Maciej's suggestion of looking at the hibernate log, which pointed me in the right direction (tables OK, nothing logged).
I apparently had carried over a jbpm.default.cfg.xml file from an older (4.0?) version, and that version did NOT have the following lines:
<object class="org.jbpm.pvm.internal.history.HistorySessionImpl" />
This apparently (correctly) causes all calls to the history service to succeed, without anything getting recorded. So, for anyone out there, if you find yourself with getHistoryService().createHistoryProcessInstanceQuery().list() or getHistoryService().createHistoryActivityInstanceQuery().list() returning zero results, I suggest you check your jbpm.default.cfg.xml file.