Hi @iCFO, one answer to that question can be found (if time/inclination permits) in this rather scary workflow:
It’s scary for a few of reasons:
(1) it requires python install (using the now legacy python nodes, but won’t work in beyond python 3.9 and above because of removal of certain methods (I’ve just downloaded it and tried it with python 3.7.8 in KNIME 4.7.8 and it works there, but no guarantees about later releases)
(2) It attempts to process the workflow.knime xml file, which I haven’t seen documented, and so it is based on manually working out what was going on at the time, and so may (or might not?) change with KNIME 5.x
(3) I wrote the workflow just under 3 months after seeing KNIME for the first time, so there may well be a lot of newbie mistakes in it
However, contained within it is the ability to produce a list of the nodes contained within a workflow, and identify for each the previous and next node, and the port number from which the join was made.
I may well revisit this at some point (but not today! lol) to see if it works with KNIME 5.x, and update it so that the python code (in a component used in the workflow) can be updated to work beyond python 3.8.x.
As an idea of what it produces when it executes, the above workflow simply reads its own workflow.knime file. This is what the workflow looks like:
And the output is this:
Additional notes: