Search in sources :

Example 6 with ActivityStatisticsQuery

use of org.camunda.bpm.engine.management.ActivityStatisticsQuery in project camunda-bpm-platform by camunda.

the class ActivityStatisticsAuthorizationTest method testQueryIncludingInstancesWithoutAuthorizationOnProcessInstance.

// including instances //////////////////////////////////////////////////////////////
public void testQueryIncludingInstancesWithoutAuthorizationOnProcessInstance() {
    // given
    String processDefinitionId = selectProcessDefinitionByKey(ONE_INCIDENT_PROCESS_KEY).getId();
    createGrantAuthorization(PROCESS_DEFINITION, ONE_INCIDENT_PROCESS_KEY, userId, READ);
    // when
    ActivityStatisticsQuery query = managementService.createActivityStatisticsQuery(processDefinitionId);
    // then
    verifyQueryResults(query, 0);
}
Also used : ActivityStatisticsQuery(org.camunda.bpm.engine.management.ActivityStatisticsQuery)

Aggregations

ActivityStatisticsQuery (org.camunda.bpm.engine.management.ActivityStatisticsQuery)6 ProcessInstance (org.camunda.bpm.engine.runtime.ProcessInstance)4 ArrayList (java.util.ArrayList)1 ManagementService (org.camunda.bpm.engine.ManagementService)1 ActivityStatistics (org.camunda.bpm.engine.management.ActivityStatistics)1 StatisticsResultDto (org.camunda.bpm.engine.rest.dto.StatisticsResultDto)1 ActivityStatisticsResultDto (org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto)1 InvalidRequestException (org.camunda.bpm.engine.rest.exception.InvalidRequestException)1