public ResultListDataRepresentation getContentItemsForProcessInstance(String processInstanceId) { // TODO: check if process exists if (!permissionService.hasReadPermissionOnProcessInstance(SecurityUtils.getCurrentUserObject(), processInstanceId)) { throw new NotPermittedException("You are not allowed to read the process with id: " + processInstanceId); } return createResultRepresentation(contentService.createContentItemQuery().processInstanceId(processInstanceId).list()); }
contentItemQuery.processInstanceId(request.getProcessInstanceId());