Community Articles

Find and share helpful community-sourced technical articles.
avatar
Rising Star

LIMITATIONS OF TEMPLATES

If a user wants to change the flows using templates, i.e., downloading templates and uploading them back, then the following issues will occur: 

  • The template will not preserve the state. It is not supposed to. The template is just a blueprint of the components, not their data.
  • New controller services will be created instead of using already existing ones, which is expected behavior in templates.
  • Templates will be unsupported in CFM 4.0/ NiFi 2.0 and there are not active improvements being done to them.

FLOW DEFINITION

The better solution in this case will be to use flow definitions instead of templates. The steps to use flow definitions are: 

  1. Right-click on Process Group > Click on Download Flow Definition > select the option to download flow JSON with or without external controller services. “External” here means services referenced inside the PG, but existing at a higher level.
  2. Then, if you import that flow definition (JSON) that has references to external services, it will not create a Controller service rather it will automatically select them from the higher level as long as there is only one available choice with the same name and type. Meaning if the parent level has two services with the same name and type, then it won’t know which one to select.

 

1,605 Views
Comments
avatar
New Contributor

what do you mean by external services?

avatar
Rising Star

Controller services referenced by the selected process group but outside its scope. For example, you create a controller service which is used by multiple PGs/flows including the one in question and you want it to be included in the flow definition output.