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

Improve API to get a report about cleanable historic instances

    Details

    • Type: Task
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.8.0, 7.8.0-alpha2
    • Component/s: engine
    • Labels:
      None

      Description

      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.

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: