Uploaded image for project: 'Camunda Optimize'
  1. Camunda Optimize
  2. OPT-2833 Variable Filter OR logic for different variables
  3. OPT-5632

Modify POST /api/report/:id/evaluate endpoint to allow multiple filter values

    XMLWordPrintable

Details

    • Not defined

    Description

      For the purpose of allowing the combination of variable filters with OR logic, we need to modify the POST /api/report/:id/evaluate endpoint to accept a list of filter values. The proposed API change should look something like:

      {
          id: 'string',
          name: 'string',
          lastModifier: 'user_id',
          lastModified: '2017-11-05T04:11:17.121',
          owner: 'user_id',
          created: '2017-11-04T11:15:35.111',
          combined: false,
          reportType: 'process',
          currentUserRole: 'editor', // or viewer
          data: {
            processDefinitionKey: '...',
            processDefinitionVersions: ['...'], // a list of versions or ['all'] or ['latest']
            tenantIds: ["tenantId1", ...] // none, one or multiple tenantIds, to filter for instances with no tenant provide a `null` entry or an empty list
            filter: [
              {
       
        "type": "variable",
        "data": [
       
          {
            "type": "type1",
            "name": "variable name",
            "data": {
              "values": [
                filter value
              ]
            }
          },
       
          {
            "type": "type2",
            "name": "variable name",
            "data": {
              "values": [
                "filter value 1",
                 "filter value 2"
              ]
            }
          }
        ],
        "filterLevel": "instance",
        "appliedTo": [
          "definition"
        ]
       
      }
            ],
            view: {
              entity: 'processInstance', // 'flowNode'
              property: 'frequency'
            }
            groupBy: {
              type: 'startDate',  // 'flowNodes', 'variable', 'endDate'
              value: {
                unit: 'day'  // month, hour, day, year, week, automatic
              }
            },
            distributedBy: {
              type: 'none', // or userTask, FlowNode, Assignee, Candidate Group
              value: null
            },
            visualization: 'number',  // 'table', 'bar', 'line', 'pie', 'badge', 'heat',
          },
          result: {
            measures: [{
              property: 'duration',
              aggregationType: 'min',  // optional
              userTaskDurationTime: 'work'   // optional
              data: [
                {key: "2017-11-01T00:00:00", value: 23}, // can also contain optional 'label' property for e.g. groupBy: flowNodes reports
                {key: "2017-11-02T00:00:00", value: 7},
                {key: "2017-11-03T00:00:00", value: 11},
                ...
              ]
            }],
            isComplete: true // false if the result data is truncated due exceeding length limit
            instanceCount: 1234,
            instanceCountWithoutFilters: 1300,
            type: 'map'
          }
        }
      
      

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              Unassigned Unassigned
              andromachi.rozaki Andromachi Rozaki
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce