Skip to main content
emanueol
Silver ⭐️⭐️
November 28, 2019
Solved

Unable to find CANVAS Processors/ControlerSercives IDs on exported XML template.

Hi, this has been troubling for months..

I simply can't find any CANVAS ID (Processor or ControllerService)  on the exported XML template 😞

 

Example - on my canvas I see :

Name
PutS3Object
Id
0c6637cc-bea1-1c43-a023-921b68e400f5
Type
PutS3Object 1.0.0
 
Now i created template for the PG, and theres no 0c6637cc-bea1-1c43-a023-921b68e400f5 on the xml ?!
 
This is very annoying, why i can't see any IDs on canvas on the exported xml ?
 
We have cluster of 3 nodes and PG is versioned on NiFi registry.
 
Any suggestions in how to locate on XML template any Processor or ControllerService using their ID as visible on canvas editor ?
 
Thanks,
Emanuel O.
MattWho
MattWhoAnswer
Titanium ⭐️⭐️⭐️
December 3, 2019

@emanueol 

 

The intent of templates was to allow users to create re-useable dataflows or distribute dataflows to another NiFi installation. Since you can not have more than one component with the same uuid, the uuids are randomized when both creating the template and each time the components from a template are instantiated to the canvas.  

The best way to identify your component in the xml is by uniquely naming your components.  By default a components name will be the same as the component type; however, users can modify the name to whatever they like.

 

Hope this helps,

Matt

8 replies

emanueol
emanueolAuthor
Silver ⭐️⭐️
December 3, 2019

This is really very basic question, Im surprised it doenst get answers..

Im just wondering if it is normal or not, that a NiFi processor id doesnt exist on the xml after we export processor group as template and download it ?

 

Thanks in advance.

Translate
stevenmatison
Platinum ⭐️⭐️
December 3, 2019

Are you templating the Process Group?    Or are you selecting multiple items on the main canvas and creating a template?

 

Without answers to those questions, I can definitely say that if you multi select PGs, Procs, Queues, etc, they should all be found in the template.   However, sometimes Controller Services do not make it into the template.   I usually create these Controller Services at the root level, and leave them there.  I then create all my work in Process Group, template and version this PG.   

 

In the future to help others comment,  you should provide screen shots showing your method of templating, and maybe even showing the template contents (if small enough).  Also Nifi Version, and other important information.  Then we are more prepared to make official answers.

Translate
emanueol
emanueolAuthor
Silver ⭐️⭐️
December 3, 2019

Hi Steve, seems theres no way to paste screenshots (as I tried), seems i need to find a public server to host the screenshots prior to update my post.

Will do that soon..

 

Meawhwile some answers/more detail:

  1. simple PG with no sub PGs, just processors+controllers+PG vars.
  2. anyway, doenst matter if i export PG or PG contents as xml template, i cant find any id's anyway.
  3. NiFi version (cluster of 3 nodes)
    1.8.0
    10/22/2018 23:48:30 EDT

    Tagged nifi-1.8.0-RC3

 

As soon I figured out a public server where I can host images, I will post full detailed request.

But anyway and again.. its really basic problem.. IDs on xml template dont match whatever IDs I see on editor (canvas), no matter if i export full PG or just a bunch of processors.

Translate
stevenmatison
Platinum ⭐️⭐️
December 3, 2019

Thank you for the deeper info.

 

I created a template, opened the xml, grabbed a randomn ID, then search for it in NiFI ui,  NO MATCH.

 

I then went to do a match specifically from flow to template.

 

Flow ID:  1b694005-09dd-1382-0000-000032678b58

Template ID:  c4e8f083-508c-3471-0000-000000000000

 

 

 

I think what you are experiencing is normal NiFi behavior.   The IDs are not going to persist, or be equal as you move a template to different environments.   This may be indicated by noticing that all of the IDs in the template are 00000000ed out.

 

 

 

Translate
MattWho
Titanium ⭐️⭐️⭐️
MattWhoAnswer
Titanium ⭐️⭐️⭐️
December 3, 2019

@emanueol 

 

The intent of templates was to allow users to create re-useable dataflows or distribute dataflows to another NiFi installation. Since you can not have more than one component with the same uuid, the uuids are randomized when both creating the template and each time the components from a template are instantiated to the canvas.  

The best way to identify your component in the xml is by uniquely naming your components.  By default a components name will be the same as the component type; however, users can modify the name to whatever they like.

 

Hope this helps,

Matt

Translate