lordgamez commented on code in PR #2095:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2095#discussion_r2826786687
##########
behave_framework/src/minifi_test_framework/minifi/nifi_flow_definition.py:
##########
@@ -113,9 +113,22 @@ def to_json(self) -> str:
connections_node = config["rootGroup"]["connections"]
+ processors_by_name = {p.name: p for p in self.processors}
+ input_ports_by_name = {port.name: port for port in self.input_ports}
+ output_ports_by_name = {port.name: port for port in self.output_ports}
+
for conn in self.connections:
+ source_type = "PROCESSOR"
source_proc = processors_by_name.get(conn.source_name)
+ if not source_proc:
+ source_proc = input_ports_by_name.get(conn.source_name)
+ source_type = "INPUT_PORT"
+ conn.source_relationship = ""
Review Comment:
In NiFi only empty relationship works for ports, it fails to start up with
`undefined` relationship: `java.lang.IllegalArgumentException: No relationship
with name undefined exists for Local Ports`
--
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]