How to get all running process instances of a process definition in jBPM 3.2 ?

Solution Unverified - Updated -

Issue

  • We are trying to find all the running instances of a process definition. The only way we could find was to execute the following API:
      graphSession.findProcessInstances(processDefinition.getId());

But, it returns all process instances and then we have to filter by the hasEnded flag. However, as the number of process instances grows, this API call will slow down.
Is there a way to get only the number of running process instances?

Environment

  • jBPM
    • 3.2.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.