Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-7987

Improve API to get a report about cleanable historic instances

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.8.0, 7.8.0-alpha2
    • None
    • 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

              roman.smirnov Roman Smirnov
              roman.smirnov Roman Smirnov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: