-
Bug Report
-
Resolution: Won't Fix
-
L3 - Default
-
None
-
7.15.0
-
None
Environment (Required on creation): Camunda 7.15.0 Unittest
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket): I have created a simple testcase, see https://github.com/hmueller99/camunda-test.git
Steps to reproduce (Required on creation):
- Run test and see/verify test failure
- Change camunda version in pom.xml to 7.14.0
- Run test and see/verify test success!
Observed Behavior (Required on creation):
With
TaskQuery activeTasks = taskService.createTaskQuery().active().taskAssigned().orderByTaskId().asc();
Tasks in query result list are not sorted by taskId.
Expected behavior (Required on creation):
Task result list IS sorted by taskId.
Hi hmueller99,
Thank you for providing an example that reproduces the issue. I can see it on my side as well. However, the behavior is expected.
The reason that the sorting is not correct is the following.
Keep in mind that Camunda doesn't recommend using the Database ID generator in production. There is a UUID generator available for use in production, which generates strings that include numbers and letters (e.g. "fe722567-d389-4933-a6ef-af8c26890981").
I would recommend using the orderByTaskCreateTime() instead, as it is more reliable than the Task ID for sorting purposes.
I will close this ticket, as it is not a bug report.
Best,
Nikola