I often have specific nodes in large workflows that I need to edit to provide different input/initial variables and others elsewhere that I often want to monitor so I can check on the progress of loops. I would find it really useful if specific nodes could be “bookmarked” so that they could be quickly navigated to by selecting in a “bookmark panel”.
Hear hear. +1 on the vote count
I had a think about how we could implement “poor man’s bookmarks” right now in the Modern UI …
Idea
The “workflow monitor” panel in the MUI of the latest versions of KNIME allows us to quickly jump to a specific node that is displaying a warning or an error
What if we could make a specific node always display a warning or an error, so that when we place it somewhere in the workflow, we can jump to it using the workflow monitor functionality?
Suitable “bookmark” Node
The question then was, find a suitable node. This has to be a node that can sit unattached and alone on the workflow in a warning or error state such that we can somehow configure it to give a specific warning/error message (ie the bookmark name)
Java Edit variable ?
My initial thought was Java Edit variable. It can sit detached from the workflow, and if it contains any errors, these will get displayed on the workflow monitor panel even if we don’t ask it to execute:
e.g.
we could edit Java Edit Variable to simply throw an “Abort”. This causes KNIME to permanently display an error in the Workflow Monitor:
throw new Abort("Bookmark - End of flow");
This gives us an always-available shortcut to that node.
So that was one possibility. It works. Not particularly obvious though as to why we have these random detached java snippets all over the workflow, but it minimally does the job.
I wondered if there were any other nodes that might be better from a “documentary” point of view…
Node Annotator
I think I may have discovered a new use for The Node Annotator node from the Nodepit Power Nodes extension.
Drop a Node Annotator onto the workflow and configure it like this, giving a message enclosed in a pair of curly braces:
e.g.
{{bookmark: my bookmark title}}
Tick the box to keep message after reset.
Execute it once.
You now have a self-documented bookmark (it is annotated with the bookmark name ) and in the node monitor you have a Warning shortcut to it generated automatically because the curly braces caused it to try to interpret the bookmark title as a flow variable, and the warning message also contains the name of our “bookmark”.
OK, not quite as good as a dedicated “bookmarks” panel, but hey… it provides quick navigation in the absence of “find” functionality.
This is a mysterious application scenario of Node Annotator
… Nice, I like it.
I was thinking about something else; essentially, the workflow is just a node tree with node config, and bookmarks are actually just markers for nodes on the node tree.
I’m not just thinking about bookmarks, I’m thinking about what else we can do once we display the node tree.