look in e.g the taskmanagementsession class in org.jbpm.db source tree or in the beans in the webapp sourcecode. There are many examples in there, but you do have to learn the hibernate QL.
Thanks for the quick reply, I am actually very familiar with hibernate, I know I can use hibernate criteria or HQL to query against the JBPM database. But I am wondering if it can be done with JBPM APIs?
Logically if we can load one instance from
GraphSession. loadProcessInstance(long id), would it be nice we can have more methods like loadNonEndedProcessInstance(String processDefinition)
If we can have something like that, the hibernate layer could become completely transparent to JBPM users.
Thanks a lot