is it possible to export all node descriptions that I have made on a workflow?
@iperez I think one possibility would be to identify the XML files and elements within where the comments are stored and import them with the help of XML reader and xpath settings.
There is no ready made solution but the examples in this folder might give you an idea how to start.
Hello @iperez,
you mean node annotations, right? And why do you need those? Documentation purposes?
Do you know about workflow summary XML file that can be obtained from either the File --> Export --> Workflow Summary (JSON/XML)…
menu in KNIME Analytics Platform, or from a KNIME Server’s REST API? Also there is Analyze Workflow Summary Component that extracts information from it which I modified to also extract Node annotations as part of Nodes Summary output table. You can further modify it to fit your needs. (Just as an info modification was done in second XPath node of Get Node Attributes metanode and GroupBy node of High Level WF Summary metanode in a branch that feeds above mentioned output table.)
Here is modified Component together with workflow from which node annotations are extracted. (Caution: This is just example (workflow along with component) meaning don’t use this component in a workflow you are analyzing cause you will end up analyzing nodes from Component as well.)
2021_10_27_Extract_Node_Annotations.knwf (184.1 KB)
And finally more about Metadata Documentation can be read here:
Br,
Ivan
Hi @ipazin!! I hadn´t work with that summary, it has loads of information. Thanks for the component modification. As you say it is something we ned for documentation purposes, what we want is to fully register what is done in the node and how/why a particular config is chosen. Since doing it in the node annotation would make the workflow visually hard, we were thinking of using the configurable node description:
I’ve not found it in the XML,in order to make the changes in the component, maybe I’m missing something…
Hello @iperez,
I see. Honestly don’t remember anyone using this node description option but seems reasonable if longer text is needed. (Also hoovering over node provides you with given description which is handy.) And you are right, seems it’s not part of workflow summary file so forget about above Component if you are looking only for this information. Instead you can find it inside seetings.xml file of each folder’s node. Then simply (took me a while) use XML Reader node followed by XPath node. Take a look at attached workflow.
2021_10_28_Extract_Node_Descriptions_Annotations.knwf (40.0 KB)
I extracted node annotations as well so you can distinguish easier between same nodes. Also it might be useful to combine this with mentioned Component but seems this settings file doesn’t feature node id so don’t see a way to do so
Hope this helps!
Br,
Ivan
Hello @ipazin. Thank you for your help, This is what I was looking for. You’re the best!!
You are welcome @iperez. And glad to hear that (part where you say that this works for you )
Ivan
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.