Improve API to get a report about cleanable historic instances

XMLWordPrintable

    • Type: Task
    • Resolution: Fixed
    • Priority: L3 - Default
    • 7.8.0, 7.8.0-alpha2
    • Affects Version/s: None
    • Component/s: engine
    • 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.

        This is the controller panel for Smart Panels app

              Assignee:
              Roman Smirnov
              Reporter:
              Roman Smirnov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: