use of org.camunda.bpm.engine.rest.dto.runtime.ActivityInstanceDto in project camunda-bpm-platform by camunda.
the class ProcessInstanceResourceImpl method getActivityInstanceTree.
@Override
public ActivityInstanceDto getActivityInstanceTree() {
RuntimeService runtimeService = engine.getRuntimeService();
ActivityInstance activityInstance = null;
try {
activityInstance = runtimeService.getActivityInstance(processInstanceId);
} catch (AuthorizationException e) {
throw e;
} catch (ProcessEngineException e) {
throw new InvalidRequestException(Status.INTERNAL_SERVER_ERROR, e, e.getMessage());
}
if (activityInstance == null) {
throw new InvalidRequestException(Status.NOT_FOUND, "Process instance with id " + processInstanceId + " does not exist");
}
ActivityInstanceDto result = ActivityInstanceDto.fromActivityInstance(activityInstance);
return result;
}
Aggregations