Ben,

Thanks for taking the time to report this and for providing great detail!!

I'm going to add the steps you provided to NIFI-3509 because it does
seem like it could be related to that.

Can you provide the templates that were created from the steps you outlined?

Either a gist or attaching the xml files to NIFI-3509 would be fine.

Thanks,

Bryan


On Wed, Mar 22, 2017 at 3:56 PM, Benjamin Garrett
<[email protected]> wrote:
> Today I tried to export a fairly complicated nifi template (several layers
> deep of process groups within process groups).  I imported it on a different
> nifi host/instance, and encountered two issues.
> 1. When importing the template, no errors messages are encountered, however
> an entire subProcessGroup was missing from the flow.  Also a connection was
> drawn to the wrong subProcessGroup.
> 2. I then made some modifications to the original flow, exported a new
> template, and this time during template import there was an error message
> pop-up: "Cannot add Connection to Process Group because its destination does
> not belong to this Process Group".  After the error message pop-up, the root
> process group still shows up in the UI, however all connections (between all
> processors/groups, and within all process groups) are now missing.
>
> I have encountered the problem(s) on both nifi 1.1.1 and 1.1.2 (on CentOS 6
> and 7).  The problem(s) may be related to:
> https://issues.apache.org/jira/browse/NIFI-3509
>
> I was able to reproduce both of the issues above with a much simpler flow
> than my original flow.  I would be able to share any of the xml files for
> this simpler flow upon request.  Here are the steps to reproduce:
>
> 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.
>
> Let me know if you need any further info.
>
> Thanks!
> Ben Garrett

Reply via email to