public virtual void testQueryByTenantId() { HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery().tenantIdIn(TENANT_ONE); assertThat(query.count(), @is(1L)); query = historyService.createHistoricProcessInstanceQuery().tenantIdIn(TENANT_TWO); assertThat(query.count(), @is(1L)); }
public virtual void testQueryNoAuthenticatedTenants() { identityService.setAuthentication("user", null, null); HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery(); assertThat(query.count(), @is(1L)); }
public virtual void testQueryDisabledTenantCheck() { processEngineConfiguration.TenantCheckEnabled = false; identityService.setAuthentication("user", null, null); HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery(); assertThat(query.count(), @is(3L)); }
public virtual void testQueryAuthenticatedTenants() { identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE, TENANT_TWO)); HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery(); assertThat(query.count(), @is(3L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(1L)); assertThat(query.tenantIdIn(TENANT_TWO).count(), @is(1L)); assertThat(query.withoutTenantId().count(), @is(1L)); }
public virtual void testQueryAuthenticatedTenant() { identityService.setAuthentication("user", null, Collections.singletonList(TENANT_ONE)); HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery(); assertThat(query.count(), @is(2L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(1L)); assertThat(query.tenantIdIn(TENANT_TWO).count(), @is(0L)); assertThat(query.tenantIdIn(TENANT_ONE, TENANT_TWO).count(), @is(1L)); }
public virtual CountResultDto queryHistoricProcessInstancesCount(HistoricProcessInstanceQueryDto queryDto) { queryDto.ObjectMapper = objectMapper; HistoricProcessInstanceQuery query = queryDto.toQuery(processEngine); long count = query.count(); CountResultDto result = new CountResultDto(); result.Count = count; return(result); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void deleteHistoricProcessInstanceWithAuthenticatedTenant() public virtual void deleteHistoricProcessInstanceWithAuthenticatedTenant() { testRule.deployForTenant(TENANT_ONE, BPMN_PROCESS); string processInstanceId = startProcessInstance(null); identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE)); historyService.deleteHistoricProcessInstance(processInstanceId); identityService.clearAuthentication(); HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery(); assertThat(query.count(), @is(0L)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void deleteHistoricProcessInstanceWithDisabledTenantCheck() public virtual void deleteHistoricProcessInstanceWithDisabledTenantCheck() { testRule.deployForTenant(TENANT_ONE, BPMN_PROCESS); testRule.deployForTenant(TENANT_TWO, BPMN_PROCESS); string processInstanceIdOne = startProcessInstance(TENANT_ONE); string processInstanceIdTwo = startProcessInstance(TENANT_TWO); identityService.setAuthentication("user", null, null); processEngineConfiguration.TenantCheckEnabled = false; historyService.deleteHistoricProcessInstance(processInstanceIdOne); historyService.deleteHistoricProcessInstance(processInstanceIdTwo); HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery(); assertThat(query.count(), @is(0L)); }
protected internal virtual void cleanUpAfterVariableInstanceTest(params string[] processInstanceIds) { processEngineConfiguration.TenantCheckEnabled = false; foreach (string processInstanceId in processInstanceIds) { Task task = taskService.createTaskQuery().processInstanceId(processInstanceId).singleResult(); if (task != null) { taskService.complete(task.Id); } historyService.deleteHistoricProcessInstance(processInstanceId); } identityService.clearAuthentication(); HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery(); assertThat(query.count(), @is(0L)); processEngineConfiguration.TenantCheckEnabled = true; }
public virtual void testQueryByWithoutTenantId() { HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery().withoutTenantId(); assertThat(query.count(), @is(1L)); }
public virtual void testQueryByNonExistingTenantId() { HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery().tenantIdIn("nonExisting"); assertThat(query.count(), @is(0L)); }
public virtual void testQueryNoTenantIdSet() { HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery(); assertThat(query.count(), @is(3L)); }