Cockpit missing pagination (presumably due to bug)

Hi all,

When browsing the process instances in the cockpit, it does not show all instances and pagination is missing. I saw this because I could not find a process instance in there that had a visible and completable task in the tasklist.

I have 30 instances of a specific process definition / version.

The call to the backend is capped to 50

But at any given point a max of 25 results is returned by the back-end. Due to this, pagination is missing.

I cannot think of any other reason than this as the process instance is running ok + a task is visible and completable.

The process definition page only displays the process instances of the currently selected version. So if your current version contains 30 running instances, it still would not show pagination, as the threshold is 50 entries. That the backend returns only 25 results is strange indeed and I could not reproduce it locally.

Do you have tenants in the system?

No I do not use tenants. For me it looked like the thresholds, front-end and back-end, where out of sync.
Strange that you do not have the issue.

I use Camunda v7.5

Could you please check what happens if you set the maxResults argument in the query to something less than 25? E.g. do you get only five results if you query /process-instance?firstResult=0&maxResults=5&sortBy=startTime&sortOrder=desc

At what point does the returned number of results stop matching your expectation?

Could you also check the return value of /process-instance/count?

When I change the limit of the maxResults, the number of resulted objects is never the treshhold.
maxResults=2 gives me 1 object
5 gives me 3 objects
10 gives me 5 objects
20 gives me 10 objects

Looks like the number of results returned is always ceil ( maxResults / 2).

The count call returns the correct number.

{processDefinitionId: "productOrderProcess:21:f64fd5c5-63bb-11e6-9e2b-4e8dcd585ba0"}

That is very weird. I don’t know what would cause this behavior. Maybe @thorben has an idea what is going on.

Which exact version are you using? 7.5.0?
Edit: Are you able to reproduce the problem with both, standalone REST API (i.e. http://<IP:PORT>/engine-rest/...) and the web app’s API http://<IP:PORT>/camunda/...?

Hi Thorben,

Yes, I am using version 7.5.0.

The engine-rest webservice gives me all results. :sweat_smile:
–> result is an array of 30 objects
–> result is an array of 15 objects

EDIT: removing firstResult as query param does not result in a change of behaviour.

I suspect you are hitting this bug:
To verify, do you have two authorizations in place that enable the logged in user to access the set of process instances (e.g. permission READ on any resource of type process instance and permission READ_INSTANCE on any resource of type process definition)? If yes, can you check if the query results are correct if you remove one of them?

Edit: the root cause of the bug is that every matching row gets counted as often as you have matching authorizations.

I am logged in as the standard camunda-admin ‘demo’. It is a development environment.

The admin group has for all levels of authorization ALLOW ALL *.
On some tasks, the demo user has some extra authorization entries; READ, UPDATE.

I cannot map the missing tasks to all the rules but it is quite possible that it is related to this bug, yes.
Sounds reasonable :slight_smile: