Incorrect process instance count in Cockpit process definition statistics query #4756
Labels
group:support
All requests that are linked to a customer request. DRI: Tassilo
potential:7.22.3
type:bug
Issues that describe a user-facing bug in the project.
version:7.23.0
Environment (Required on creation)
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)
When multiple instances of a process definition are running with at least two open incidents for each instance of different incident types, the count of running process instances in the Processes view in Cockpit is wrong. The displayed count is equal to the actual count times the amount of different incident types. For example: There are two incidents with different types per instance and three instances are running. The Processes view in Cockpit would display six running instances (3 instances x 2 incident types).
Steps to reproduce (Required on creation)
parallel
.Details
Observed Behavior (Required on creation)
The running process instances count is double what we would expect. For example: With two instances of the example process above, you should see a running instances count of four. However, only two instances are running.
Expected behavior (Required on creation)
The running instances count is correctly displayed. For example: With two instances of the example process above, you should see two running instances.
Root Cause (Required on prioritization)
The query used for the statistics is this one:
camunda-bpm-platform/webapps/assembly/src/main/resources/org/camunda/bpm/cockpit/plugin/base/queries/processDefinition.xml
Line 55 in ab78ff5
The query groups instances by incident type (here and here). This part of the query was initially copied from the statistics endpoint in the public API. This endpoint can filter and sort by incident type. The Cockpit variant does not need this functionality and does not support it.
Solution Ideas
Remove the grouping by
INCIDENT_TYPE_
from the Cockpit query.Hints
Links
Breakdown
Pull Requests
Dev2QA handover
The text was updated successfully, but these errors were encountered: