Ejemplo n.º 1
0
        public virtual void testQueryWithReadHistoryPermissionOnAnyProcessDefinition()
        {
            // given
            string processDefinitionId = selectProcessDefinitionByKey(PROCESS_KEY).Id;

            startProcessInstanceByKey(PROCESS_KEY);
            startProcessInstanceByKey(PROCESS_KEY);
            startProcessInstanceByKey(PROCESS_KEY);

            createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_HISTORY);

            // when
            HistoricActivityStatisticsQuery query = historyService.createHistoricActivityStatisticsQuery(processDefinitionId);

            // then
            verifyQueryResults(query, 1);
            verifyStatisticsResult(query.singleResult(), 3, 0, 0, 0);
        }