cancel
Showing results for 
Search instead for 
Did you mean: 

unable to iterate through all results of query on historic-process-instances using 'includeProcessVariables'

nicolasfranck
Champ in-the-making
Champ in-the-making
I'm using activiti-rest (version 5.15.1).

This was my plan:
  1. do a query on the historic process-instances

      http://localhost:8888/activiti-rest/service/history/historic-process-instances?processDefinitionKey=...

  2. iterate through ALL the results, by increasing the parameter start by 100 (size is already 100)

But this has some strange results. See the results below:

INPUT parameters        |   result

start=0,size=100         |  total is 1152, size is 100
start=100,size=100     |  total is 1152, size is 100
start=200,size=100     |  total is 1152, size is 44
start=300,size=100     |  total is 1152, size is 0
start=400,size=100     |  total is 1152, size is 0

You see what's happening? In the third step, size becomes "44", and afterwards "0",
even though "total" suggests otherwise.

When "includeProcessVariables" is set to false, all works as expected.

The same behaviour appears in the endpoint for runtime process instances

Any idea what's happening here? Some kind of SQL join that fails (I'm just guessing).

5 REPLIES 5

trademak
Star Contributor
Star Contributor
Could you test if this behaviour is the same for the latest Activiti release?
Do all your process instances have variable values, or only some of them?

Best regards,

nicolasfranck
Champ in-the-making
Champ in-the-making
You're right. It seems to work in version 5.16.3.

I only tried starting some dummy process instances, with only one variable in it.
I will test this on our real data

nicolasfranck
Champ in-the-making
Champ in-the-making
Ok, everything works. Thanks!

nicolasfranck
Champ in-the-making
Champ in-the-making
Ok, I'm using version 5.16.3, and now this behaviour reoccurs at start=2000.

trademak
Star Contributor
Star Contributor
If this is reproducible, please create a unit test and create a JIRA issue. Then we'll make sure to get it fixed asap.

Best regards,