use of org.camunda.bpm.engine.history.HistoricCaseActivityInstance in project camunda-bpm-platform by camunda.
the class HistoricCaseActivityInstanceResourceImpl method getHistoricCaseActivityInstance.
public HistoricCaseActivityInstanceDto getHistoricCaseActivityInstance() {
HistoryService historyService = engine.getHistoryService();
HistoricCaseActivityInstance instance = historyService.createHistoricCaseActivityInstanceQuery().caseActivityInstanceId(caseActivityInstanceId).singleResult();
if (instance == null) {
throw new InvalidRequestException(Status.NOT_FOUND, "Historic case activity instance with id '" + caseActivityInstanceId + "' does not exist");
}
return HistoricCaseActivityInstanceDto.fromHistoricCaseActivityInstance(instance);
}
use of org.camunda.bpm.engine.history.HistoricCaseActivityInstance in project camunda-bpm-platform by camunda.
the class MultiTenancyCaseInstanceCmdsTenantCheckTest method disableCaseExecutionDisabledTenantCheck.
@Test
public void disableCaseExecutionDisabledTenantCheck() {
identityService.setAuthentication("user", null, null);
processEngineConfiguration.setTenantCheckEnabled(false);
caseService.disableCaseExecution(caseExecutionId);
identityService.clearAuthentication();
HistoricCaseActivityInstance historicCaseActivityInstance = getHistoricCaseActivityInstance();
assertThat(historicCaseActivityInstance, notNullValue());
assertThat(historicCaseActivityInstance.isDisabled(), is(true));
}
use of org.camunda.bpm.engine.history.HistoricCaseActivityInstance in project camunda-bpm-platform by camunda.
the class MultiTenancyCaseInstanceCmdsTenantCheckTest method completeCaseExecutionWithAuthenticatedTenant.
@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));
}
use of org.camunda.bpm.engine.history.HistoricCaseActivityInstance in project camunda-bpm-platform by camunda.
the class MultiTenancyCaseInstanceCmdsTenantCheckTest method disableCaseExecutionWithAuthenticatedTenant.
@Test
public void disableCaseExecutionWithAuthenticatedTenant() {
identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE));
caseService.disableCaseExecution(caseExecutionId);
identityService.clearAuthentication();
HistoricCaseActivityInstance historicCaseActivityInstance = getHistoricCaseActivityInstance();
assertThat(historicCaseActivityInstance, notNullValue());
assertThat(historicCaseActivityInstance.isDisabled(), is(true));
}
use of org.camunda.bpm.engine.history.HistoricCaseActivityInstance in project camunda-bpm-platform by camunda.
the class MultiTenancyCaseInstanceCmdsTenantCheckTest method completeCaseExecutionDisabledTenantCheck.
@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));
}
Aggregations