number of open cases



I'm using bonita studio 6.2.6 and would like to know how to get the number of open cases about a process .

thank you so much


Submitted by fabio.lombardi on Wed, 12/17/2014 - 14:38

Hi r.mualaba, just a quick question, would you like to use the REST API or the java API? in which environment are you developing?

Submitted by r.mualaba on Wed, 12/17/2014 - 16:17

hi @fabio, i would like to use the REST API, i'm developing in a subscribed edition 6.2.6 studio

according to you what's the easiest of way to make it REST API or java API?

thank you one more time

1 answer


Hi r.mualaba,

Using the JAVA API you could use the processAPI.getNumberOfOpenedActivityInstances(getNumberOfOpenedActivityInstances) method, while using the REST API you can easily do it in this way:

1) call http://[your_host]:[your_port]/bonita/API/bpm/case?p=0&c=10&f=processDefinitionId%3d[the_process_definition_id] 2) read the response header "Content-Range" - Let's suppose that your process has 2 open cases and you called the API as reported above, the Response header will contain: - "Content-Range:0-10/2" => which means that you asked for the page 0 (p=0 in the url), with max 10 results per page ( c = 10 in the url ) of a total of 2 cases. So the part you should be interested is the /2.

For more information on how to use the rest apis and their examples, I suggest you the see the doc:

Cheers, Fabio