bejancsaba commented on code in PR #7998:
URL: https://github.com/apache/nifi/pull/7998#discussion_r1386713417


##########
minifi/minifi-commons/minifi-commons-framework/src/main/java/org/apache/nifi/minifi/commons/service/FlowEnrichService.java:
##########
@@ -90,6 +91,9 @@ public byte[] enrichFlow(byte[] flowCandidate) {
         }
 
         VersionedDataflow versionedDataflow = 
parseVersionedDataflow(flowCandidate);
+        
versionedDataflow.setReportingTasks(ofNullable(versionedDataflow.getReportingTasks()).orElseGet(ArrayList::new));
+        
versionedDataflow.setRegistries(ofNullable(versionedDataflow.getRegistries()).orElseGet(ArrayList::new));
+        
versionedDataflow.setControllerServices(ofNullable(versionedDataflow.getControllerServices()).orElseGet(ArrayList::new));

Review Comment:
   Do we need to do this for the others (e.g.: parameters) as well or only 
these are needed to be initialised on case of an empty flow



##########
minifi/minifi-commons/minifi-commons-framework/src/main/java/org/apache/nifi/minifi/commons/service/FlowEnrichService.java:
##########
@@ -103,10 +107,12 @@ public byte[] enrichFlow(byte[] flowCandidate) {
             rootGroup.setInstanceIdentifier(randomUUID().toString());
         }
 
+        rootGroup.getControllerServices().forEach(cs -> 
cs.setScheduledState(ENABLED));

Review Comment:
   This seems unrelated to the startup issue, is this specific to NiFi 2.0?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to