what version? In 3 you can get a hibernate session and do whatever you want. in 4 there are query api's.
- We're planning to use JBPM 4.0 but I see no possibility to do mentioned above queries using query API. I see only ProcessInstanceQuery class providing very basic functionality. Or You meant some other API, are You?
- If I do queries through Hibernate session I'll be automatically dependent on some internal JBPM classes like: org.jbpm.pvm.internal.model.ExecutionImpl. Is it legal? Which is official JBPM position on that?
- Also developer's guide says:
"Currently jBPM's persistence is based on hibernate. But in the future we might switch to JPA. That is why we recommend to stick with the API as much as possible as the API will hide you from those changes. "
- I never mentioned that the query api's would do what you need, I just wanted to point at the differences between 3 and 4
- Custom queries through sessions are not supported on jbpm4 yet (not sure if they will be or if the query api will/need to be extended.
- Correct, see previous statement