-
Task
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
To get a report about cleanable historic process instances, the Java API looks like this:
HistoryService historyService = ...; HistoricFinishedProcessInstanceReport report = historyService.createHistoricFinishedProcessInstanceReport(); List<HistoricFinishedProcessInstanceReportResult> result = report.list();
The interface HistoricFinishedProcessInstanceReport just exposes the method #list() and nothing else.
There are two options how the API could look like:
1) HistoryService#getCleanableHistoricProcessInstanceReport()
It exists a simple method in the HistoryService which exposes the function #getCleanableHistoricProcessInstanceReport(), which directly returns a list of HistoricFinishedProcessInstanceReportResult
2) HistoricFinishedProcessInstanceReport extends the Query interface
Then HistoricFinishedProcessInstanceReport must implement #list(), #listPage() etc. With that approach the cleanable report API behaves in the same like it behaves in cases a HistoricProcessInstanceQuery. In addition, some filter criteria can be defined like #processDefinitionIdIn() etc.
We should go for the second approach.