nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy LoPresto <>
Subject Re: Getting the value of a variable defined in a processor group
Date Tue, 14 May 2019 18:05:41 GMT

I don’t believe there is a good way to get a complete list of all variables within processor
code. If you want to explore this further, you can take a look at StandardProcessContext [1],
which processors have access to in their #onTrigger() method, and MutableVariableRegistry
[2], which is the only concrete implementation of the ComponentVariableRegistry interface
which exposes a variable map (the StandardComponentVariableRegistry returns an empty map when
accessed). The issue is that the context does not expose the ProcessorNode field, which is
the intermediary to the variable registry. I believe this is by design. There may be a valid
use case to provide an accessor method on the context to return a variable map, or at least
the entry set. 

I’d like to hear from Matt Gilman, Bryan Bende, and/or Mark Payne with their thoughts, since
much of this code was written by them. 


Andy LoPresto
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On May 14, 2019, at 10:48 AM, Vijay Chhipa <> wrote:
> Hello
> I am writing a new NiFi processor. In the source code I would like to use a variable
defined in the NiFi processor group using the UI. 
> Is there a way to get the map of all the variables available to this processor?
> I am on NiFi 1.9.1 
> Thanks

View raw message