-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
7.14.0
-
None
-
None
-
Camunda 7.14 on Windows
We have a project with some process instances that have been running for more than a month now. We have used the OpenApi definition to be able to search for historic process instances.
This has worked fine until now where the generated API code (generated using NSwag) suddenly returns null as the result of one of the queries.
Making the same request against the Camunda RET API (using Postman), we get a result:
[ { "id": "2df223bc-1861-11eb-b192-005056a32322", "businessKey": "NNN", "processDefinitionId": "67c44b87-259e-11eb-9efb-005056a32322", "processDefinitionKey": "XXX", "processDefinitionName": "YYY", "processDefinitionVersion": 4, "startTime": "2020-10-27T15:32:02.667+0100", "endTime": "2020-11-25T06:15:57.646+0100", "removalTime": null, "durationInMillis": 2472234979, "startUserId": null, "startActivityId": "StartEvent_1", "deleteReason": null, "rootProcessInstanceId": "2df223bc-1861-11eb-b192-005056a32322", "superProcessInstanceId": null, "superCaseInstanceId": null, "caseInstanceId": null, "tenantId": null, "state": "COMPLETED" } ]
This is a process instance that has been running for more than a month.
When debugging the generated API code to figure out why it returns null, we could see the following problem:
The duration in milliseconds exceeds the 'durationInMillis' attribute of the HistoricProcessInstanceDto class.
Looking at the camunda-api JSON file:
"durationInMillis": { "type": "integer", "format": "int32", "nullable": true, "description": "The time the instance took to finish (in milliseconds)." },
This should probably be changed to 'int64' rather than 'int32'.
Hints:
- 'durationInMillis' is also used in other definitions (e.g. HistoricActivityInstanceDto)