/** * Submits the specified lineage request. * * @param lineageDto dto * @return updated lineage */ public LineageDTO submitLineage(LineageDTO lineageDto) { final LineageRequestDTO requestDto = lineageDto.getRequest(); // get the provenance repo final ProvenanceRepository provenanceRepository = flowController.getProvenanceRepository(); final ComputeLineageSubmission result; if (LineageRequestType.FLOWFILE.equals(requestDto.getLineageRequestType())) { if (requestDto.getUuid() != null) { // submit uuid if it is specified result = provenanceRepository.submitLineageComputation(requestDto.getUuid(), NiFiUserUtils.getNiFiUser()); } else { // submit the event if the flowfile uuid needs to be looked up result = provenanceRepository.submitLineageComputation(requestDto.getEventId(), NiFiUserUtils.getNiFiUser()); } } else { // submit event... (parents or children) if (LineageRequestType.PARENTS.equals(requestDto.getLineageRequestType())) { result = provenanceRepository.submitExpandParents(requestDto.getEventId(), NiFiUserUtils.getNiFiUser()); } else { result = provenanceRepository.submitExpandChildren(requestDto.getEventId(), NiFiUserUtils.getNiFiUser()); } } return getLineage(result.getLineageIdentifier()); }