From 687476e9a8ca783c171b1bb54e7b6efc25d99e7c Mon Sep 17 00:00:00 2001 From: Marton Szasz Date: Mon, 23 Feb 2026 13:33:43 +0100 Subject: [PATCH 1/2] MINIFICPP-2725 python: fix EL with ENVIRONMENT scope Signed-off-by: Marton Szasz --- extensions/python/pythonprocessors/nifiapi/properties.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/python/pythonprocessors/nifiapi/properties.py b/extensions/python/pythonprocessors/nifiapi/properties.py index aafb0b0608..06f0a9653e 100644 --- a/extensions/python/pythonprocessors/nifiapi/properties.py +++ b/extensions/python/pythonprocessors/nifiapi/properties.py @@ -267,7 +267,11 @@ def evaluateAttributeExpressions(self, flow_file: FlowFile = None): return self new_string_value = None - if self.is_dynamic: + if flow_file is None and self.is_dynamic: + new_string_value = self.cpp_context.getDynamicProperty(self.name) + elif flow_file is None: + new_string_value = self.cpp_context.getProperty(self.name) + elif self.is_dynamic: new_string_value = self.cpp_context.getDynamicProperty(self.name, flow_file.cpp_flow_file) else: new_string_value = self.cpp_context.getProperty(self.name, flow_file.cpp_flow_file) From 9206c2817fded80da4ed8bee4404a5eb0f69db36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Sz=C3=A1sz?= Date: Tue, 24 Feb 2026 17:56:47 +0100 Subject: [PATCH 2/2] Refactor property retrieval logic in properties.py --- .../python/pythonprocessors/nifiapi/properties.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/extensions/python/pythonprocessors/nifiapi/properties.py b/extensions/python/pythonprocessors/nifiapi/properties.py index 06f0a9653e..3cbd4c58c3 100644 --- a/extensions/python/pythonprocessors/nifiapi/properties.py +++ b/extensions/python/pythonprocessors/nifiapi/properties.py @@ -266,15 +266,9 @@ def evaluateAttributeExpressions(self, flow_file: FlowFile = None): if not self.el_supported or not self.value: return self - new_string_value = None - if flow_file is None and self.is_dynamic: - new_string_value = self.cpp_context.getDynamicProperty(self.name) - elif flow_file is None: - new_string_value = self.cpp_context.getProperty(self.name) - elif self.is_dynamic: - new_string_value = self.cpp_context.getDynamicProperty(self.name, flow_file.cpp_flow_file) - else: - new_string_value = self.cpp_context.getProperty(self.name, flow_file.cpp_flow_file) + getter = self.cpp_context.getDynamicProperty if self.is_dynamic else self.cpp_context.getProperty + args = () if flow_file is None else (flow_file.cpp_flow_file,) + new_string_value = getter(self.name, *args) return PythonPropertyValue(self.cpp_context, self.name, new_string_value, self.el_supported, self.controller_service_definition, self.is_dynamic) def asControllerService(self):