2 Replies Latest reply on Oct 5, 2005 10:17 AM by mayue00

    How do I query the process instances?

    mayue00 Newbie

      Hi,
      Could anyone please tell me how to retrieve certain process instances from database? For example I want to get all the process instances that have not ended yet.

      Thanks in advance.

      Mark

        • 1. Re: How do I query the process instances?
          Ronald van Kuijk Master

          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.

          • 2. Re: How do I query the process instances?
            mayue00 Newbie

            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

            Mark