use of org.camunda.bpm.engine.HistoryService 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.HistoryService in project camunda-bpm-platform by camunda.
the class HistoricDecisionInstanceResourceImpl method getHistoricDecisionInstance.
public HistoricDecisionInstanceDto getHistoricDecisionInstance(Boolean includeInputs, Boolean includeOutputs, Boolean disableBinaryFetching, Boolean disableCustomObjectDeserialization) {
HistoryService historyService = engine.getHistoryService();
HistoricDecisionInstanceQuery query = historyService.createHistoricDecisionInstanceQuery().decisionInstanceId(decisionInstanceId);
if (includeInputs != null && includeInputs) {
query.includeInputs();
}
if (includeOutputs != null && includeOutputs) {
query.includeOutputs();
}
if (disableBinaryFetching != null && disableBinaryFetching) {
query.disableBinaryFetching();
}
if (disableCustomObjectDeserialization != null && disableCustomObjectDeserialization) {
query.disableCustomObjectDeserialization();
}
HistoricDecisionInstance instance = query.singleResult();
if (instance == null) {
throw new InvalidRequestException(Status.NOT_FOUND, "Historic decision instance with id '" + decisionInstanceId + "' does not exist");
}
return HistoricDecisionInstanceDto.fromHistoricDecisionInstance(instance);
}
use of org.camunda.bpm.engine.HistoryService in project camunda-bpm-platform by camunda.
the class HistoricCaseInstanceResourceImpl method getHistoricCaseInstance.
public HistoricCaseInstanceDto getHistoricCaseInstance() {
HistoryService historyService = engine.getHistoryService();
HistoricCaseInstance instance = historyService.createHistoricCaseInstanceQuery().caseInstanceId(caseInstanceId).singleResult();
if (instance == null) {
throw new InvalidRequestException(Status.NOT_FOUND, "Historic case instance with id '" + caseInstanceId + "' does not exist");
}
return HistoricCaseInstanceDto.fromHistoricCaseInstance(instance);
}
use of org.camunda.bpm.engine.HistoryService in project camunda-bpm-platform by camunda.
the class HistoricProcessInstanceResourceImpl method getHistoricProcessInstance.
@Override
public HistoricProcessInstanceDto getHistoricProcessInstance() {
HistoryService historyService = engine.getHistoryService();
HistoricProcessInstance instance = historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
if (instance == null) {
throw new InvalidRequestException(Status.NOT_FOUND, "Historic process instance with id " + processInstanceId + " does not exist");
}
return HistoricProcessInstanceDto.fromHistoricProcessInstance(instance);
}
use of org.camunda.bpm.engine.HistoryService in project camunda-bpm-platform by camunda.
the class HistoricJobLogResourceImpl method getStacktrace.
public String getStacktrace() {
try {
HistoryService historyService = engine.getHistoryService();
String stacktrace = historyService.getHistoricJobLogExceptionStacktrace(id);
return stacktrace;
} catch (AuthorizationException e) {
throw e;
} catch (ProcessEngineException e) {
throw new InvalidRequestException(Status.NOT_FOUND, e.getMessage());
}
}
Aggregations