Importing nodes - existing nodes/subflows - question

Please read it all before replying.

OK, I have kind of asked before but I am still not understanding it.
(Though it does seem a bit better than before)

Saying NR 1.3.5
I have subflows.

I import a flow (code) from another machine and an existing subflow is included.

I get a warning (notification?) about the conflict and I pick view nodes then unselect the existing subflow.

When imported, the node is not loaded.
So I have to then drag the existing subflow node and wire it up.

Now, before you say: That's an old version of NR!
I tried it on 2.0.5 and it simply imported it all. No requesters at all.

So I'm confused - and I know it is not an easy thing to do - but if I import code/nodes with existing subflow nodes (in this case)..... what is the process needing to be done so I don't get duplicate subflow nodes?

Does it work on the latest node red?

That depends on what you mean by work.

On NR 2.0.1 (the latest I have I think) it just imports the code.
Duplicate subflow included.

Just did it again and I have 2 iterations of the subflow listed.

is that what you call Working? Not to me.

I know what I am asking in the bigger picture is complicated.

Here is a few pictures to show the problem as I see it.

On a machine running an older version of NR.

I am exporting this code.

This is the other machine running NR 2.0.1. Note I have a subflow called time stamp.

(to be sure to be sure)

Import and paste.

Now I have 2 iterations of the subflow.

Ok, I know it is hard to do what I am talking about.
But when exporting I am asking what/which nodes to include.
Fair enough.

But when importing..... Nothing.

Now I get that this may be a version issue.

I think once when I imported I was prompted which nodes to include.
I don't know how easy it is but saying I deselect the nodes to include and which to not - to get around conflicts.
Then would it be expected that the node/s with the conflict are replaced with the existing one/s?

The question is, does it work on the latest node-red?

Its a bit difficult for me to say if I don't have THE latest.

I am asking with what I have. If that which I am asking is only recently added, then I get that it won't work on earlier versions.

If you deselect a node in the import-conflicts dialog, then it won't be imported.

If it is selected, there's another option as to whether it should replace or import a copy.

That ought to work exactly as described.

1 Like

Thanks.

I have seen that request (but that is going from a new version to an old version of NR)

I get the requester and deselect the node of conflict it imports the flow.
But there is a big hole in that which I then get imported.

I can't replicate this happening.
(Well, I can but it is even more confusing for me and I think I am getting off topic)

Shouldn't the existing node on the machine which has a conflict with the nodes/code being imported be put in the place of the node from the imported code?

But as an example this is what I saw the time I did deselect the conflicting node.

Exporting:

This is what I get when I import:

Why isn't the existing time stamp subflow put in the flow when it is imported?

This is an example. I can't remember how I got it to ask me and all the fine details of what I did.

I can't remember the precise behaviour of old versions of Node-RED.

We improved the import dialogue to better handle import conflicts in more recent releases.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.