[
https://issues.apache.org/jira/browse/NIFI-3509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15938479#comment-15938479
]
Bryan Bende commented on NIFI-3509:
-----------------------------------
An email from the users list reported the following which may be related to
this issue. Steps reported by the user....
1. Create Process Group 'Test'
2. Within the 'Test' process group, define another process group 'InnerGroupA'.
Within 'InnerGroupA', define a simple flow: 'Input' input port -> an
UpdateAttribute processor -> and an 'Output' output port.
3. Within the 'Test' process group, define a simple flow such as GetFile ->
InnerGroupA -> LogAttribute.
4. Select the 'InnerGroupA' process group. Create a Template using only the
'InnerGroupA' process group and name the template 'InnerGroupATemplate'.
5. Within the 'Test' process group, import the 'InnerGroupATemplate'. Notice
how by default it is named 'Copy of InnerGroupA'. Rename it to 'InnerGroupB'.
6. Within the 'Test' process group, make sure that 'InnerGroupB' has its Output
connected to LogAttribute.
7. Within the 'Test' process group, for GetFile, make sure that its output is
MOVED/CHANGED to 'InnerGroupB'. After this, GetFile should be pointing to
InnerGroupB only (instead of InnerGroupA).
8. Select the 'Test' process group. Create a template using only the 'Test'
process group and name the template 'GetFileShouldPointToInnerGroupBTemplate'.
9. Now try to import the 'GetFileShouldPointToInnerGroupBTemplate' (on a
different nifi instance, or the same nifi instance, it doesn't matter). Notice
how there are no errors while importing this template. However, once you place
the template on the canvas, notice how the InnerGroupB group has completely
disappeared from within the Test process group. Moreover, the connection from
GetFile is erroneously pointing to InnerGroupA (instead of InnerGroupB, which
is missing anyway).
10. Now, return to the original 'Test' process group that you started with.
Within 'InnerGroupB', import the 'InnerGroupATemplate' template. By default it
will be called 'InnerGroupA', so rename it to 'SubInnerGroupC' just so we don't
get it confused with the other process groups.
11. Within 'InnerGroupB', change UpdateAttribute's output to point to
SubInnerGroupC.
12. Within 'InnerGroupB', make SubInnerGroupC's output point to the port called
'Output'.
13. Return to the original 'Test' process group, and delete the 'InnerGroupA'
group (it will require you to delete the output connection to LogAttribute).
14. Select the original 'Test' process group. Create a template using only the
'Test' process group and name the template
'ReproducesErrorMessagePopupTemplate'.
15. Now try to import the 'ReproducesErrorMessagePopupTemplate' (on a different
nifi instance, or the same nifi instance, it doesn't matter). There will be an
error message pop-up: "Cannot add Connection to Process Group because its
destination does not belong to this Process Group".
In summary, you can encounter these erors if you have a parent/root process
group that contains multiple subProcessGroups, and either:
(1) some of those subProcessGroups were created via a template of a first
subProcessGroup that still lives in the parent/root process group, or
(2) there is a deep hierarchy of subProcessGroups within other
subProcessGroups, and you created some of these from templates of a first
subProcessGroup. Subsequently you delete that first subProcessGroup that was
used as a basis of the template.
> Creating templates of copied and pasted PGs can cause issues
> -------------------------------------------------------------
>
> Key: NIFI-3509
> URL: https://issues.apache.org/jira/browse/NIFI-3509
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.1.1
> Reporter: Joseph Percivall
> Assignee: Oleg Zhurakousky
> Priority: Critical
> Attachments: Screen Shot 2017-02-20 at 7.38.49 PM.png, Screen Shot
> 2017-02-20 at 7.53.21 PM.png, Screen Shot 2017-02-20 at 7.53.34 PM.png
>
>
> Using the following steps I was able to create a template which instantiates
> with connections from one input port to another input port of another PG. See
> the template here[1].
> See the first attached screenshot for the seed flow. After importing, it
> originally gives an error "Cannot add Connection to Process Group because its
> destination does not belong to this Process Group" and nothing appears to be
> added but after I refresh the canvas parts of the original flow appear
> (screenshot 2 and 3).
> What is most odd, is that there are connections going from the input port
> "input" of pg "test" to the input ports of other PGs. I didn't think that was
> possible.
> The steps I used to create it:
> 1: create a PG "test" with input port "input", UpdateAttribute and output
> port "output". Creating connections between them.
> 2: Go to Parent group and copy "test".
> 3: Go back into "test" and paste.
> 4: Copy and paste "test" multiple times, creating the flow.
> 5: Create a template of the flow
> 6: When using the template, see the issue described.
> The root cause of the issues, I believe, is that the id for the parent group
> starts with "f3ac1eb5-1010-115a" and when I copied and pasted "test" into
> itself it created the "test" pg with an id starting with the same value.
> [1] https://gist.github.com/JPercivall/923519ef09500886c50a8f574f7662ca
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)