Created 04-10-2017 01:34 AM
Currently any NiFi templates that are created are not stored anywhere outside of flow.xml.gz unless they are explicitly downloaded using the NiFi UI.
I can see them within my flow.xml.gz file and can still download them and import them using the UI, so I am not experiencing any issues in terms of the template function. However it was my understanding that active templates would automatically be persisted in directory conf/templates, or otherwise in a custom location using the nifi.templates.directory property.
Is this the correct behaviour? Or is the templates directory more a convenience for downloaded templates to be manually stored into? I have NiFi version 1.1.2.
Thanks!
Created 04-10-2017 03:13 PM
The templates directory is left-over from old versions of NiFi (0.x).. in the 1.x line all templates are stored with in flow.xml.gz in order to inherit the same security model as other components when running in a secure instance. When you upload a template in 1.x, you are doing so through the context palette on the left which is uploading it into the current processor group you are in (or the root group if on the root canvas) and if you create a new template it is being created in the process group you are in.
Created 04-10-2017 03:13 PM
The templates directory is left-over from old versions of NiFi (0.x).. in the 1.x line all templates are stored with in flow.xml.gz in order to inherit the same security model as other components when running in a secure instance. When you upload a template in 1.x, you are doing so through the context palette on the left which is uploading it into the current processor group you are in (or the root group if on the root canvas) and if you create a new template it is being created in the process group you are in.
Created 04-10-2017 10:38 PM
Thanks for clearing it up @Bryan Bende, much appreciated.
Created 04-10-2017 03:18 PM
The templates directory was left around to assist those users who are moving from NiFi 0.x to NiFi 1.x baseline. Since NiFi 0.x placed all generated templates in this directory, you can copy those templates over to the configured directory in NIFi 1.x and NiFi will load them in to the flow.xml.gz file for you on startup. There really is no other use for this property other then the above migration.
Thanks, Matt
Created 04-10-2017 10:36 PM
Thanks @Matt Clarke, much appreciated