number of open cases
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: http://documentation.bonitasoft.com/product-bos-sp/web-rest-api-0
Cheers, Fabio
Comments
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?
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