Hi Sofiya,

In short, the answer to all 3 questions is no.

A Controller Service is essentially a pluggable mechanism that Processors can 
use, and they integrate with one another only through the Java interface that 
the Controller Service provides.
Processor properties are (very intentionally) not able to be modified by 
Controller Services or even the Processors themselves.

However, to point #3, you could create a Controller Service with an interface 
like:

void doSomething(Map<String, String> properties);

And then you can have a Processor call that service and pass in all of its 
properties:

MyService service = 
context.getProperty(MY_SERVICE).asControllerService(MyService.class);
service.doSomething(context.getAllProperties());

But the service itself has no way to specifically determine who is calling it 
or inquire about its configuration, etc.

Hope this helps!

Thanks
-Mark


> On Nov 16, 2023, at 3:31 PM, София Крайнюк <[email protected]> 
> wrote:
> 
> 
>  
> Dear developer team of NiFi,
> Hello. I'm studying the work of NiFi and I have a few questions about how the 
> Controller Service works. I will be glad if you can answer them or tell me in 
> which section of the documentation I should find the answers.
> Can the controller affect the processor? Specifically:
> 1) Can the controller change the values of processor properties during its 
> operation?
> 2) Can the controller add properties to the processor?
> 3) Can the controller take the values of the processor properties and use 
> them in its work?
> --
> Best regards,
> Sofiya Kraynyuk
> Java Developer

Reply via email to