Example #1
0
        public virtual void testActivityStatistics()
        {
            ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("SingleTaskProcess");

            ActivityStatisticsQuery query = managementService.createActivityStatisticsQuery(processInstance.ProcessDefinitionId);

            assertThat(query.count(), @is(1L));
        }
Example #2
0
        public virtual void testQueryNoAuthenticatedTenantForActivityStatistics()
        {
            ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("SingleTaskProcess");

            identityService.setAuthentication("user", null);

            ActivityStatisticsQuery query = managementService.createActivityStatisticsQuery(processInstance.ProcessDefinitionId);

            assertThat(query.count(), @is(0L));
        }
Example #3
0
        public virtual void testQueryDisabledTenantCheckForActivityStatistics()
        {
            ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("SingleTaskProcess");

            identityService.setAuthentication("user", null);
            processEngineConfiguration.TenantCheckEnabled = false;

            ActivityStatisticsQuery query = managementService.createActivityStatisticsQuery(processInstance.ProcessDefinitionId);

            assertThat(query.count(), @is(1L));
        }