apache-nifiapache-nifi-registry

Getting current flow version


I need to put the current flow version (as in the version number in NiFi Registry) on the properties of each flow file.

I know that I can use Expression Language to get system properties. Is there a property that contains the current version?


Solution

  • The version number is not something that is currently accessible from expression language. The only thing you could do right now would be to put an UpdateAttribute processor as the first processor inside the versioned process group, and set an attribute like "nifi.registry.version", but you'd have to keep the value up to date when you save the new version of the flow so that it is checked in to registry with next version.