This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new 4346001e75 NIFI-13672 Add documentation for referencing Controller 
Services in Python Processors (#10389)
4346001e75 is described below

commit 4346001e75f92546e2cbbc50fbcc3a6cc2603556
Author: Pierre Villard <[email protected]>
AuthorDate: Sat Oct 4 23:59:49 2025 +0200

    NIFI-13672 Add documentation for referencing Controller Services in Python 
Processors (#10389)
    
    Signed-off-by: David Handermann <[email protected]>
---
 .../src/main/asciidoc/python-developer-guide.adoc     | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/nifi-docs/src/main/asciidoc/python-developer-guide.adoc 
b/nifi-docs/src/main/asciidoc/python-developer-guide.adoc
index d69ed881a7..ec08d7f866 100644
--- a/nifi-docs/src/main/asciidoc/python-developer-guide.adoc
+++ b/nifi-docs/src/main/asciidoc/python-developer-guide.adoc
@@ -389,6 +389,25 @@ def getDynamicPropertyDescriptor(self, propertyname):
 If this method is not implemented and a user adds a property other than those 
that are explicitly supported, the Processor will become
 invalid. Of course, we might also specify explicit validators that can be 
used, etc.
 
+==== Referencing Controller Services
+
+Python processors can reference existing Java controller services using the 
same mechanism as Java processors. Set the
+`controller_service_definition` parameter on a `PropertyDescriptor` to the 
fully qualified class name of the controller service
+interface that should be exposed in the drop-down. For example:
+
+----
+self.lookup_service = PropertyDescriptor(
+    name='Lookup Service',
+    description='String lookup service used to enrich incoming records.',
+    required=True,
+    controller_service_definition='org.apache.nifi.lookup.StringLookupService'
+)
+----
+
+Within the processor implementation the configured service instance can be 
retrieved via the usual property accessors, for
+example `context.getProperty(self.lookup_service.name).asControllerService()`. 
NiFi ensures that only controller services
+implementing the referenced interface are eligible for selection. While simple 
class names work when type names are unique, using
+the fully qualified interface name avoids ambiguity when multiple controller 
services share the same simple name.
 
 
 [[relationships]]

Reply via email to