Skip to content

Commit dc4bac2

Browse files
committed
NIFI-14405 Handle creating context in backend
Signed-off-by: Maciej Bukalo <[email protected]>
1 parent 88d6bf9 commit dc4bac2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java

+7
Original file line numberDiff line numberDiff line change
@@ -2676,6 +2676,8 @@ public Response uploadProcessGroup(
26762676
@FormDataParam("clientId") final String clientId,
26772677
@Parameter(description = "Acknowledges that this node is disconnected to allow for mutable requests to proceed.")
26782678
@FormDataParam(DISCONNECTED_NODE_ACKNOWLEDGED) @DefaultValue("false") final Boolean disconnectedNodeAcknowledged,
2679+
@FormDataParam("parameterContextHandlingStrategy")
2680+
@DefaultValue("KEEP_EXISTING") final ParameterContextHandlingStrategy parameterContextHandlingStrategy,
26792681
@FormDataParam("file") final InputStream in) throws InterruptedException {
26802682

26812683
// ensure the group name is specified
@@ -2712,6 +2714,11 @@ public Response uploadProcessGroup(
27122714
// clear Registry info
27132715
sanitizeRegistryInfo(deserializedSnapshot.getFlowContents());
27142716

2717+
// replace parameter contexts if necessary
2718+
if (ParameterContextHandlingStrategy.REPLACE.equals(parameterContextHandlingStrategy)) {
2719+
parameterContextReplacer.replaceParameterContexts(deserializedSnapshot, serviceFacade.getParameterContexts());
2720+
}
2721+
27152722
// resolve Bundle info
27162723
serviceFacade.discoverCompatibleBundles(deserializedSnapshot.getFlowContents());
27172724

0 commit comments

Comments
 (0)