mirror of https://github.com/apache/nifi.git
NIFI-2330: Ensure that we set ProcessGroupDTO's contents after populating sets of components, as the contents dto now copies the sets
This closes #686 Signed-off-by: jpercivall <joepercivall@yahoo.com>
This commit is contained in:
parent
2a8be95480
commit
39a4d84a62
|
@ -133,16 +133,6 @@ public class FlowFromDOMFactory {
|
|||
final Set<ProcessGroupDTO> processGroups = new HashSet<>();
|
||||
final Set<RemoteProcessGroupDTO> remoteProcessGroups = new HashSet<>();
|
||||
|
||||
final FlowSnippetDTO groupContents = new FlowSnippetDTO();
|
||||
groupContents.setConnections(connections);
|
||||
groupContents.setFunnels(funnels);
|
||||
groupContents.setInputPorts(inputPorts);
|
||||
groupContents.setLabels(labels);
|
||||
groupContents.setOutputPorts(outputPorts);
|
||||
groupContents.setProcessGroups(processGroups);
|
||||
groupContents.setProcessors(processors);
|
||||
groupContents.setRemoteProcessGroups(remoteProcessGroups);
|
||||
|
||||
NodeList nodeList = DomUtils.getChildNodesByTagName(element, "processor");
|
||||
for (int i = 0; i < nodeList.getLength(); i++) {
|
||||
processors.add(getProcessor((Element) nodeList.item(i), encryptor));
|
||||
|
@ -183,6 +173,16 @@ public class FlowFromDOMFactory {
|
|||
connections.add(getConnection((Element) nodeList.item(i)));
|
||||
}
|
||||
|
||||
final FlowSnippetDTO groupContents = new FlowSnippetDTO();
|
||||
groupContents.setConnections(connections);
|
||||
groupContents.setFunnels(funnels);
|
||||
groupContents.setInputPorts(inputPorts);
|
||||
groupContents.setLabels(labels);
|
||||
groupContents.setOutputPorts(outputPorts);
|
||||
groupContents.setProcessGroups(processGroups);
|
||||
groupContents.setProcessors(processors);
|
||||
groupContents.setRemoteProcessGroups(remoteProcessGroups);
|
||||
|
||||
dto.setContents(groupContents);
|
||||
return dto;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue