Uploaded image for project: 'Camunda Optimize'
  1. Camunda Optimize
  2. OPT-1907

Find easy way to extract the type of a combined report

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • L3 - Default
    • 2.5.0-alpha1, 2.5.0
    • None
    • backend
    • None

    Description

      Right now, we have several places where we actually need to find out which kind of combined report is on hand. For instance and excerpt of the CombinedReportResult:

        public List<String[]> getResultAsCsv(final Integer limit, final Integer offset, Set<String> excludedColumns) {
          Optional firstResultOptional = reportResultDto.getResult().values().stream().findFirst();
          List<String[]> csvStrings;
          if (firstResultOptional.isPresent()) {
           Object firstResult = firstResultOptional.get();
            if (firstResult instanceof ProcessReportMapResultDto) {
              CombinedProcessReportResultDto<ProcessReportMapResultDto> combinedResult =
                (CombinedProcessReportResultDto<ProcessReportMapResultDto>) reportResultDto;
              csvStrings = mapCombinedMapResultToCsv(limit, offset, combinedResult);
            }
      // .....
      

      Instead of going through the result itself and we should be able to infer the type directly.

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              Unassigned Unassigned
              johannes.heinemann Johannes
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce