mosermw commented on code in PR #9889:
URL: https://github.com/apache/nifi/pull/9889#discussion_r2096419909
##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java:
##########
@@ -1047,6 +1047,11 @@ public Response createProcessGroup(
// If there are any Parameter Providers referenced by Parameter
Contexts, resolve these to point to the appropriate Parameter Provider, if we
are able to.
unresolvedParameterProviders.addAll(serviceFacade.resolveParameterProviders(flowSnapshot,
NiFiUserUtils.getNiFiUser()));
+ // If Process Group name was provided in the request, prioritize
it over the name from version control
+ if
(StringUtils.isNotBlank(requestProcessGroupEntity.getComponent().getName())) {
+
flowSnapshot.getFlowContents().setName(requestProcessGroupEntity.getComponent().getName());
+ }
+
Review Comment:
I feel like this section of code doesn't belong here, but instead it belongs
below (near line 1115) before the call to
serviceFacade.updateProcessGroupContents(). You'll even see a comment there
"we do want to use the name of the Process Group that is in the Flow Contents".
You might consider updating that comment, too.
--
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]