cancel
Showing results for 
Search instead for 
Did you mean: 

How to get All process-instances which are active in engine

minalghorpade
Champ in-the-making
Champ in-the-making
Hi ,
  I am using Activiti 5.12.1 and trying out REST API for process-instances. I found that it returns only 10 process-instances in respose even though there are more than 10 instances are running.

http://localhost:8080/activiti-rest/service/process-instances    (rest service for process-instances)

WHY SO??? How can I get all instances in one REST call.??

Please Help



Thanks
Minal
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
See the user guide, you can set the size of the result set you want (defaults to 10à.
&size={size=10}&sort={sort=id}&order={order=asc}

Since the resource is paged, there is no option to ask "all" of them without specifying a hard limit. Use a ridiculous high size if you want to be sure you have them all (just don't cross the MAX_VALUE = 2147483647 boundary). Please bare in mind that querying and serializing the results to JSON can take up some time if the size of the list gets bigger over time…

minalghorpade
Champ in-the-making
Champ in-the-making
Hi..
Hey Thanks for the reply. It really helped me.

Thanks
Minal