cancel
Showing results for 
Search instead for 
Did you mean: 

Task query REST returning wrong size - bug?

augustus
Champ in-the-making
Champ in-the-making
Scenario: I've created a new user and 7 new tasks. All 7 tasks are assigned to that new user (he is the owner as well). When that user login to the Activiti Explorer all 7 tasks are there.

Now when we try to call service/query/tasks REST service we get the following result: [total=7, start=0, sort=id, order=asc, size=4].
This search is done without variables. When we add variables and set size=5, size is set to 2 sometimes 3 in the result response [size=2].

As we can see, service was able to find all 7 tasks properly, but for some reason services returns only few results not all.

Can someone confirm that paging works properly with this service please?
9 REPLIES 9

trademak
Star Contributor
Star Contributor
Hi,

Yes that should definitely work. I've added a unit test just now that tests this in specific and there are no problems identified there. Could you create a unit test that shows your issue?

Best regards,

augustus
Champ in-the-making
Champ in-the-making
Have you called the REST service on a activiti-rest application that you've actually downloaded from the site?

augustus
Champ in-the-making
Champ in-the-making
Can you share that test with me please? It's obvious I'm doing something wrong since it's not working for me.

trademak
Star Contributor
Star Contributor

augustus
Champ in-the-making
Champ in-the-making
Hey guys. It seems it works with default users, but not we the new ones. Here is what I have done:
1. created a new user.
2. assigned 8 tasks via activiti-explorer and 7 tasks via REST call
3. performed the search via REST call (query/tasks) and I've got total=15, size=4 (it was set to 10).

If I call repository/tasks then everything is fine and proper size of results gets back. But with query/tasks for new users it does not work.

Can you please try to verify this scenario?

Thanks

trademak
Star Contributor
Star Contributor
Hi,

Which database are you testing with? Do you see the same behaviour on a H2 database?
Could you also try with the latest Master code, because we we implemented a couple of fixes in the paging logic.

Best regards,

augustus
Champ in-the-making
Champ in-the-making
I'm testing with H2 database. I'll try the new code and let you know the result.

augustus
Champ in-the-making
Champ in-the-making
Are you sure its on master code and not in some branch?

trademak
Star Contributor
Star Contributor
Yes, I'm sure it's on master 😉
If you could write a unit test showing the issue that would help a lot.

Best regards,