@Test public void completeCaseExecutionWithAuthenticatedTenant() { caseService.manuallyStartCaseExecution(caseExecutionId); identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE)); caseService.completeCaseExecution(caseExecutionId); identityService.clearAuthentication(); HistoricCaseActivityInstance historicCaseActivityInstance = getHistoricCaseActivityInstance(); assertThat(historicCaseActivityInstance, notNullValue()); assertThat(historicCaseActivityInstance.isCompleted(), is(true)); }
@Test public void completeCaseExecutionDisabledTenantCheck() { caseService.manuallyStartCaseExecution(caseExecutionId); identityService.setAuthentication("user", null, null); processEngineConfiguration.setTenantCheckEnabled(false); caseService.completeCaseExecution(caseExecutionId); identityService.clearAuthentication(); HistoricCaseActivityInstance historicCaseActivityInstance = getHistoricCaseActivityInstance(); assertThat(historicCaseActivityInstance, notNullValue()); assertThat(historicCaseActivityInstance.isCompleted(), is(true)); }