This content has been marked as final. Show 1 reply
I know that I could query the JBPM database directly but is this really the only way?
This is the way jBPM also does it. Most common functions are put in the api but you can always get the current hibernate session from the jbpmContext and use HQL to do what you want (jBPM does exactely that in the api impl.)
Besides that, your second example is not supported out of the box because it is VERY expensive. Either in adding loads of indexes to keep it somewhat performant while querying but making inserts a lot slower or by doing full table scans.